From 2e3b83df9b0cb69db6f5febae70a2e36a0a90822 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 2 Sep 2020 10:46:29 -0400 Subject: made highlight colors more obvious. fixed tags to update when #key is set in textdoc. --- src/client/views/search/SearchBox.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/client/views/search') 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 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(); this.documentKeys(d).forEach(key => Field.toString(d[key] as Field).toLowerCase().includes(query) && hlights.add(key)); -- cgit v1.2.3-70-g09d2