aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-08-16 21:56:31 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-08-16 21:56:31 -0400
commitc5e7890b5055521bf030eff8db99ff189b3f9eb2 (patch)
treea0094ea47c6487665cc1d7468a3be84bb98d243c /src/client/views/search
parent7044fda26b17c0dac007952fb146bc8307339dce (diff)
close filter button, bugfixes
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchBox.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 99db78778..c9c6aa631 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -466,6 +466,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
}
}
this._numTotalResults = found.length;
+ this.realTotalResults = found.length;
}
else {
this.noresults = "No collection selected :(";
@@ -710,6 +711,9 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
@action.bound
openSearch(e: React.SyntheticEvent) {
+ this._results.forEach(result => {
+ Doc.BrushDoc(result[0]);
+ });
e.stopPropagation();
this._openNoResults = false;
this._resultsOpen = true;
@@ -720,6 +724,10 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
@action.bound
closeSearch = () => {
+ this._results.forEach(result => {
+ Doc.UnBrushDoc(result[0]);
+ result[0].searchMatch = undefined;
+ });
//this.closeResults();
this._searchbarOpen = false;
}