diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-02 10:46:29 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-02 10:46:29 -0400 |
| commit | 2e3b83df9b0cb69db6f5febae70a2e36a0a90822 (patch) | |
| tree | 2c84680d30b0726755bd9c823b23c9a484676690 /src/client/views/search | |
| parent | 6f72743516e47a6ad077bb8e894c8005fee29fc7 (diff) | |
made highlight colors more obvious. fixed tags to update when #key is set in textdoc.
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 3d564f073..6c5278892 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -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)); |
