Debounce autosuggestions (#3836)

* Debounce autosuggestions

* Remove duplicate import
master
Eugen Rochko 8 years ago committed by GitHub
parent 05e4728de7
commit aebebdc5d1
  1. 4
      app/javascript/mastodon/features/compose/components/compose_form.js

@ -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;

Loading…
Cancel
Save