diff options
| author | bobzel <zzzman@gmail.com> | 2024-02-28 10:38:54 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-02-28 10:38:54 -0500 |
| commit | 86726ad1b7ef40ac374b53f9d5902441537df7bd (patch) | |
| tree | 877b1c6474573c88b0a655e28a0f8f7714666102 /src/client/views/FilterPanel.tsx | |
| parent | ab658feb8d5a0a2c7eb2bd213bff227b7accb23a (diff) | |
changed multirow view to support a maxShown flag so that headerBar doesn't take forever to load with a lot of closed tabs.
Diffstat (limited to 'src/client/views/FilterPanel.tsx')
| -rw-r--r-- | src/client/views/FilterPanel.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/FilterPanel.tsx b/src/client/views/FilterPanel.tsx index 818c81c9a..455801422 100644 --- a/src/client/views/FilterPanel.tsx +++ b/src/client/views/FilterPanel.tsx @@ -121,11 +121,13 @@ export class FilterPanel extends ObservableReactComponent<filterProps> { const valueSet = new Set<string>(childFilters.map(filter => filter.split(Doc.FilterSep)[1])); let rtFields = 0; let subDocs = childDocs; + let gatheredDocs = [] as Doc[]; if (subDocs.length > 0) { let newarray: Doc[] = []; while (subDocs.length > 0) { newarray = []; subDocs.forEach(t => { + gatheredDocs.push(t); const facetVal = t[facetKey]; if (facetVal instanceof RichTextField || typeof facetVal === 'string') rtFields++; facetVal !== undefined && valueSet.add(Field.toString(facetVal as Field)); @@ -135,7 +137,7 @@ export class FilterPanel extends ObservableReactComponent<filterProps> { DocListCast(t[annos ? fieldKey + '_annotations' : fieldKey]).forEach(newdoc => newarray.push(newdoc)); annos && DocListCast(t[fieldKey + '_sidebar']).forEach(newdoc => newarray.push(newdoc)); }); - subDocs = newarray; + subDocs = newarray.filter(d => !gatheredDocs.includes(d)); } } // } |
