Debounce autosuggestions requests
This commit is contained in:
parent
f0bdfadab7
commit
c4eb63c1d4
5 changed files with 40 additions and 2 deletions
|
@ -6,6 +6,7 @@ import ReplyIndicator from './reply_indicator';
|
|||
import UploadButton from './upload_button';
|
||||
import Autosuggest from 'react-autosuggest';
|
||||
import AutosuggestAccountContainer from '../../compose/containers/autosuggest_account_container';
|
||||
import { debounce } from 'react-decoration';
|
||||
|
||||
const getTokenForSuggestions = (str, caretPosition) => {
|
||||
let word;
|
||||
|
@ -104,6 +105,7 @@ const ComposeForm = React.createClass({
|
|||
this.props.onClearSuggestions();
|
||||
},
|
||||
|
||||
@debounce(500)
|
||||
onSuggestionsFetchRequested ({ value }) {
|
||||
const textarea = this.autosuggest.input;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue