aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchItem.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/views/search/SearchItem.tsx b/src/client/views/search/SearchItem.tsx
index d2e57c5ca..9c91c524b 100644
--- a/src/client/views/search/SearchItem.tsx
+++ b/src/client/views/search/SearchItem.tsx
@@ -149,12 +149,14 @@ export class SearchItem extends React.Component<SearchItemProps> {
highlightTextBox = (doc: Doc) => {
if (this.props.query) {
- doc.search_string = this.props.query;
- // FormattedTextBox.Instance.highlightSearchTerms([this.props.query]);
- }
- else {
- // FormattedTextBox.Instance.highlightSearchTerms(["hello"]);
- doc.search_string = "hello";
+ const fieldkey = 'search_string';
+ if (Object.keys(doc).indexOf(fieldkey) === -1) {
+ doc.search_string = this.props.query;
+ }
+ else {
+ doc.search_string = undefined;
+ }
+
}
}