aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/search/FilterBox.tsx3
-rw-r--r--src/client/views/search/SearchBox.scss4
-rw-r--r--src/client/views/search/SearchBox.tsx15
3 files changed, 12 insertions, 10 deletions
diff --git a/src/client/views/search/FilterBox.tsx b/src/client/views/search/FilterBox.tsx
index f11fb008c..757665bcf 100644
--- a/src/client/views/search/FilterBox.tsx
+++ b/src/client/views/search/FilterBox.tsx
@@ -87,6 +87,9 @@ export class FilterBox extends React.Component {
}
});
+
+ let el = acc[i] as HTMLElement;
+ el.click();
}
});
}
diff --git a/src/client/views/search/SearchBox.scss b/src/client/views/search/SearchBox.scss
index 324ba3063..109b88ac9 100644
--- a/src/client/views/search/SearchBox.scss
+++ b/src/client/views/search/SearchBox.scss
@@ -41,11 +41,10 @@
}
.searchBox-results {
- margin-right: 142px;
+ margin-right: 136px;
top: 300px;
display: flex;
flex-direction: column;
- margin-right: 72px;
max-height: 560px;
overflow: hidden;
overflow-y: auto;
@@ -60,5 +59,6 @@
text-transform: uppercase;
text-align: left;
font-weight: bold;
+ margin-left: 28px;
}
} \ No newline at end of file
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 3830a6d16..661c9c10b 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -22,6 +22,7 @@ export class SearchBox extends React.Component {
@observable private _searchString: string = "";
@observable private _resultsOpen: boolean = false;
+ @observable private _searchbarOpen: boolean = false;
@observable private _results: Doc[] = [];
@observable private _openNoResults: boolean = false;
@observable private _visibleElements: JSX.Element[] = [];
@@ -107,6 +108,7 @@ export class SearchBox extends React.Component {
runInAction(() => {
this._resultsOpen = true;
+ this._searchbarOpen = true;
this._openNoResults = true;
this.resultsScrolled();
});
@@ -198,6 +200,7 @@ export class SearchBox extends React.Component {
this._openNoResults = false;
FilterBox.Instance.closeFilter();
this._resultsOpen = true;
+ this._searchbarOpen = true;
FilterBox.Instance._pointerTime = e.timeStamp;
}
@@ -205,6 +208,7 @@ export class SearchBox extends React.Component {
closeSearch = () => {
FilterBox.Instance.closeFilter();
this.closeResults();
+ this._searchbarOpen = false;
}
@action.bound
@@ -281,15 +285,10 @@ export class SearchBox extends React.Component {
}
@computed
- get resFull() {
- console.log(this._numTotalResults)
- return this._numTotalResults <= 8;
- }
+ get resFull() { return this._numTotalResults <= 8; }
@computed
- get resultHeight() {
- return this._numTotalResults * 70;
- }
+ get resultHeight() { return this._numTotalResults * 70; }
render() {
return (
@@ -300,7 +299,7 @@ export class SearchBox extends React.Component {
</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" }} />
+ style={{ width: this._searchbarOpen ? "500px" : "100px" }} />
<button className="searchBox-barChild searchBox-submit" onClick={this.submitSearch} onPointerDown={FilterBox.Instance.stopProp}>Submit</button>
<button className="searchBox-barChild searchBox-filter" onClick={FilterBox.Instance.openFilter} onPointerDown={FilterBox.Instance.stopProp}>Filter</button>
</div>