summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion/suggestion_box.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-21 12:45:21 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-12-21 12:45:21 -0500
commitcadc9e11e4c5456bae97d8ba4031ea9e72edf7fb (patch)
treea1d98954c3fdc2fbd30a04289c0b6c5430f45ad9 /webapp/components/suggestion/suggestion_box.jsx
parent26e43c671c4252dccbf3b0e9257407d41e4297ae (diff)
downloadchat-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.jsx8
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);