From af8e5cf1bfbfa2d57b4fd89c72306a71d8cabe1d Mon Sep 17 00:00:00 2001
From: Tyler Schicke <tyler_schicke@brown.edu>
Date: Thu, 20 Jun 2019 11:32:54 -0400
Subject: Fixed context menu search

---
 src/client/views/ContextMenu.tsx | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'src/client/views/ContextMenu.tsx')

diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx
index fd2f970da..69692dbb8 100644
--- a/src/client/views/ContextMenu.tsx
+++ b/src/client/views/ContextMenu.tsx
@@ -167,17 +167,22 @@ export class ContextMenu extends React.Component {
         console.log(this.pageX);
         console.log();
 
+        const contents = (
+            <>
+                <span>
+                    <span className="icon-background">
+                        <FontAwesomeIcon icon="search" size="lg" />
+                    </span>
+                    <input className="contextMenu-item contextMenu-description" type="text" placeholder="Search . . ." value={this._searchString} onKeyDown={this.onKeyDown} onChange={this.onChange} autoFocus />
+                </span>
+                {this.menuItems}
+            </>
+        );
         return (
             <Measure offset onResize={action((r: any) => { this._width = r.offset.width; this._height = r.offset.height; })}>
                 {({ measureRef }) => (
                     <div className="contextMenu-cont" style={style} ref={measureRef}>
-                        <span>
-                            <span className="icon-background">
-                                <FontAwesomeIcon icon="search" size="lg" />
-                            </span>
-                            <input className="contextMenu-item contextMenu-description" type="text" placeholder="Search . . ." value={this._searchString} onKeyDown={this.onKeyDown} onChange={this.onChange} autoFocus />
-                        </span>
-                        {this.menuItems}
+                        {contents}
                     </div>
                 )
                 }
-- 
cgit v1.2.3-70-g09d2

