From cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Wed, 21 Dec 2016 12:45:21 -0500
Subject: Remove race between multiple autocomplete requests (#4860)

---
 webapp/components/suggestion/suggestion_box.jsx | 8 --------
 1 file changed, 8 deletions(-)

(limited to 'webapp/components/suggestion/suggestion_box.jsx')

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);
-- 
cgit v1.2.3-1-g7c22

