From 2174a691adab93adf0c96afdb6250ecb91b64f3d Mon Sep 17 00:00:00 2001
From: Monika <monika_hedman@brown.edu>
Date: Tue, 25 Jun 2019 17:30:52 -0400
Subject: lol why am i dumb lmk

---
 src/client/views/search/SearchBox.tsx | 39 +++++++++++++++++------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

(limited to 'src/client/views/search/SearchBox.tsx')

diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index e9eefa29a..3c401138e 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -25,7 +25,7 @@ export class SearchBox extends React.Component {
     @observable private _openNoResults: boolean = false;
     static Instance: SearchBox;
 
-    constructor(props: any){
+    constructor(props: any) {
         super(props);
 
         SearchBox.Instance = this;
@@ -112,8 +112,6 @@ export class SearchBox extends React.Component {
                 docs.push(field);
             }
         }
-        // this.props.setUnfilteredResults(docs);
-        // return docs;
         return FilterBox.Instance.filterDocsByType(docs);
     }
 
@@ -177,25 +175,26 @@ export class SearchBox extends React.Component {
     }
 
     render() {
-        return(
+        return (
             <div className="searchBox-container">
-                    <div className="searchBox-bar">
-                        <span className="searchBox-barChild searchBox-collection" onPointerDown={SetupDrag(this.collectionRef, this.startDragCollection)} ref={this.collectionRef}>
-                            <FontAwesomeIcon icon="object-group" size="lg" />
-                        </span>
-                        <input value={this._searchString} onChange={this.onChange} type="text" placeholder="Search..."
-                            className="searchBox-barChild searchBox-input" onPointerDown={this.openSearch} onKeyPress={this.enter}
-                            style={{ width: this._resultsOpen ? "500px" : "100px" }} />
-                    </div>
-                        <div className="searchBox-results" style = {this._resultsOpen ? {display: "flex"} : {display: "none"}}>
-                            {(this._results.length !== 0) ? (
-                                this._results.map(result => <SearchItem doc={result} key={result[Id]} />)
-                            ) :
-                                this._openNoResults ? (<div className="no-result">No Search Results</div>) : null}
-
-                        </div>
+                <div className="searchBox-bar">
+                    <span className="searchBox-barChild searchBox-collection" onPointerDown={SetupDrag(this.collectionRef, this.startDragCollection)} ref={this.collectionRef}>
+                        <FontAwesomeIcon icon="object-group" size="lg" />
+                    </span>
+                    <input value={this._searchString} onChange={this.onChange} type="text" placeholder="Search..."
+                        className="searchBox-barChild searchBox-input" onPointerDown={this.openSearch} onKeyPress={this.enter}
+                        style={{ width: this._resultsOpen ? "500px" : "100px" }} />
+                    <button className="searchBox-barChild searchBox-filter" onClick={FilterBox.Instance.openFilter} onPointerDown={FilterBox.Instance.stopProp}>Filter</button>
                 </div>
-        )
+                <div className="searchBox-results" style={this._resultsOpen ? { display: "flex" } : { display: "none" }}>
+                    {(this._results.length !== 0) ? (
+                        this._results.map(result => <SearchItem doc={result} key={result[Id]} />)
+                    ) :
+                        this._openNoResults ? (<div className="no-result">No Search Results</div>) : null}
+
+                </div>
+            </div>
+        );
     }
 
 }
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

