Browse Source

Debounce autosuggestions (#3836)

* Debounce autosuggestions

* Remove duplicate import
closed-social-v3
Eugen Rochko 7 years ago
committed by GitHub
parent
commit
aebebdc5d1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/mastodon/features/compose/components/compose_form.js

+ 2
- 2
app/javascript/mastodon/features/compose/components/compose_form.js View File

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

Loading…
Cancel
Save