diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-12-21 12:45:21 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-12-21 12:45:21 -0500 |
commit | cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb (patch) | |
tree | a1d98954c3fdc2fbd30a04289c0b6c5430f45ad9 /webapp/components/suggestion/suggestion_box.jsx | |
parent | 26e43c671c4252dccbf3b0e9257407d41e4297ae (diff) | |
download | chat-cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb.tar.gz chat-cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb.tar.bz2 chat-cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb.zip |
Remove race between multiple autocomplete requests (#4860)
Diffstat (limited to 'webapp/components/suggestion/suggestion_box.jsx')
-rw-r--r-- | webapp/components/suggestion/suggestion_box.jsx | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index 2fb44a340..b3f9843c6 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -38,14 +38,6 @@ export default class SuggestionBox extends React.Component { SuggestionStore.addPretextChangedListener(this.suggestionId, this.handlePretextChanged); } - componentWillReceiveProps(nextProps) { - // Clear any suggestions when the SuggestionBox is cleared - if (nextProps.value === '' && this.props.value !== nextProps.value) { - // TODO - Find a better way to not "dispatch during dispatch" - setTimeout(() => GlobalActions.emitClearSuggestions(this.suggestionId), 1); - } - } - componentWillUnmount() { SuggestionStore.removeCompleteWordListener(this.suggestionId, this.handleCompleteWord); SuggestionStore.removePretextChangedListener(this.suggestionId, this.handlePretextChanged); |