Debounce autosuggestions (#3836)

* Debounce autosuggestions

* Remove duplicate import
rebase/4.0.0rc2
Eugen Rochko 2017-06-19 01:50:56 +02:00 committed by GitHub
parent 05e4728de7
commit aebebdc5d1
1 changed files with 2 additions and 2 deletions

View File

@ -74,9 +74,9 @@ class ComposeForm extends ImmutablePureComponent {
this.props.onClearSuggestions();
}
onSuggestionsFetchRequested = (token) => {
onSuggestionsFetchRequested = debounce((token) => {
this.props.onFetchSuggestions(token);
}
}, 500, { trailing: true })
onSuggestionSelected = (tokenStart, token, value) => {
this._restoreCaret = null;