aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-08-03 19:46:09 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-08-03 19:46:09 -0400
commite87f8f5113756b188feb3de1fc6f9697a4c91b51 (patch)
treebe69438588d724b164bc6b42084329f5cf83ea9f /src/client/views/search
parentf21febd2fff86c9f4a537cd81adb6de98eaec929 (diff)
pdf search
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchBox.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 09fbe383c..de6fff5d2 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -195,6 +195,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
console.log(this._results);
this._results.forEach(result => {
Doc.UnBrushDoc(result[0]);
+ result[0].searchMatch = undefined;
});
this.props.Document._schemaHeaders = new List<SchemaHeaderField>([]);
@@ -493,15 +494,18 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
}
this.props.Document._docFilters = undefined;
this.noresults = "";
+
this.dataDoc[this.fieldKey] = new List<Doc>([]);
this.headercount = 0;
this.children = 0;
this.buckets = [];
this.new_buckets = {};
const query = StrCast(this.layoutDoc._searchString);
+ Doc.SetSearchQuery(query);
this.getFinalQuery(query);
this._results.forEach(result => {
Doc.UnBrushDoc(result[0]);
+ result[0].searchMatch = undefined;
});
this._results = [];
this._resultsSet.clear();
@@ -758,6 +762,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
this._visibleDocuments[i] = result[0];
this._isSearch[i] = "search";
Doc.BrushDoc(result[0]);
+ result[0].searchMatch = true;
Doc.AddDocToList(this.dataDoc, this.props.fieldKey, result[0]);
this.children++;
}
@@ -771,6 +776,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
console.log(lines);
result[0].lines = lines;
result[0].highlighting = highlights.join(", ");
+ result[0].searchMatch = true;
if (i < this._visibleDocuments.length) {
this._visibleDocuments[i] = result[0];
this._isSearch[i] = "search";