From 3c65a20f4587da6315d47222b5d9852d7e5ad66f Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 22 Nov 2016 09:13:14 -0500
Subject: Deleted posts now update in search results and flagged posts (#4618)

---
 webapp/components/suggestion/suggestion_box.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(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 eeae5ba28..3a8cd65cf 100644
--- a/webapp/components/suggestion/suggestion_box.jsx
+++ b/webapp/components/suggestion/suggestion_box.jsx
@@ -39,7 +39,8 @@ export default class SuggestionBox extends React.Component {
     componentWillReceiveProps(nextProps) {
         // Clear any suggestions when the SuggestionBox is cleared
         if (nextProps.value === '' && this.props.value !== nextProps.value) {
-            GlobalActions.emitClearSuggestions(this.suggestionId);
+            // TODO - Find a better way to not "dispatch during dispatch"
+            setTimeout(() => GlobalActions.emitClearSuggestions(this.suggestionId), 1);
         }
     }
 
-- 
cgit v1.2.3-1-g7c22

