From 713115be51cbc20e90be2153772e6f184ce7c76d Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Mon, 30 Nov 2015 16:27:23 -0500
Subject: Fixed SuggestionLists to properly hide when the textbox loses focus

---
 web/react/components/suggestion_box.jsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'web/react/components/suggestion_box.jsx')

diff --git a/web/react/components/suggestion_box.jsx b/web/react/components/suggestion_box.jsx
index 5510ba340..3fff5b754 100644
--- a/web/react/components/suggestion_box.jsx
+++ b/web/react/components/suggestion_box.jsx
@@ -147,8 +147,6 @@ export default class SuggestionBox extends React.Component {
     }
 
     render() {
-        const SuggestionList = this.props.listComponent;
-
         const newProps = Object.assign({}, this.props, {
             onFocus: this.handleFocus,
             onChange: this.handleChange,
@@ -173,10 +171,15 @@ export default class SuggestionBox extends React.Component {
             );
         }
 
+        const SuggestionListComponent = this.props.listComponent;
+
         return (
             <div>
                 {textbox}
-                <SuggestionList suggestionId={this.suggestionId} />
+                <SuggestionListComponent
+                    suggestionId={this.suggestionId}
+                    show={this.state.focused}
+                />
             </div>
         );
     }
-- 
cgit v1.2.3-1-g7c22

