diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-02 15:04:44 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-02 15:04:44 -0500 |
| commit | cb28e0cc898b0f7f880a23501bc1510df3c1c3fc (patch) | |
| tree | 885caa3652e04a1dc9825c49822cb7a0c73c82fe /src/client/views/search | |
| parent | 831e634e9a541eca34da163d879c80b97292204d (diff) | |
| parent | a7975e6f18b0d837403ced65ee5979b60b43f5bc (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 3d564f073..3907d2d5c 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -45,7 +45,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc private _maxSearchIndex: number = 0; private _curRequest?: Promise<any> = undefined; private _disposers: { [name: string]: IReactionDisposer } = {}; - private _blockedTypes = [DocumentType.PRESELEMENT, DocumentType.KVP, DocumentType.DOCHOLDER, DocumentType.SEARCH, DocumentType.SEARCHITEM, DocumentType.FONTICON, DocumentType.BUTTON, DocumentType.SCRIPTING]; + private _blockedTypes = [DocumentType.PRESELEMENT, DocumentType.KVP, DocumentType.FILTER, DocumentType.DOCHOLDER, DocumentType.SEARCH, DocumentType.SEARCHITEM, DocumentType.FONTICON, DocumentType.BUTTON, DocumentType.SCRIPTING]; private docsforfilter: Doc[] | undefined = []; private realTotalResults: number = 0; @@ -192,8 +192,11 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc while (docs.length > 0) { newarray = []; - docs.forEach((d) => { - d.data && newarray.push(...DocListCast(d.data)); + docs.forEach(d => { + const fieldKey = Doc.LayoutFieldKey(d); + const annos = !Field.toString(Doc.LayoutField(d) as Field).includes("CollectionView"); + const data = d[annos ? fieldKey + "-annotations" : fieldKey]; + data && newarray.push(...DocListCast(data)); const hlights = new Set<string>(); this.documentKeys(d).forEach(key => Field.toString(d[key] as Field).toLowerCase().includes(query) && hlights.add(key)); |
