i.setState(i.state);
}
- handlePostUrlChange(i: PostForm, event: any) {
+ handlePostUrlChange = debounce((i: PostForm, event: any) => {
i.state.postForm.url = event.target.value;
if (validURL(i.state.postForm.url)) {
let form: SearchForm = {
}
i.setState(i.state);
- }
+ });
- handlePostNameChange(i: PostForm, event: any) {
+ handlePostNameChange = debounce((i: PostForm, event: any) => {
i.state.postForm.name = event.target.value;
let form: SearchForm = {
q: i.state.postForm.name,
}
i.setState(i.state);
- }
+ });
handlePostBodyChange(i: PostForm, event: any) {
i.state.postForm.body = event.target.value;