aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSubView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-08-03 13:09:48 -0400
committerbobzel <zzzman@gmail.com>2021-08-03 13:09:48 -0400
commit0e8aef275346b4ba3bc1bb91fda17a335c307bf1 (patch)
tree272b26487b58db451fc6f04cb0e530b75033c49d /src/client/views/collections/CollectionSubView.tsx
parent2abbe23a9c6054e4ff5314333bba25b88554d1ec (diff)
fixed using viewSpecs when following links to set filters/viewType properly.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index 0d9b64d24..3b143aeef 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -82,13 +82,13 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
return Cast(this.dataField, listSpec(Doc));
}
docFilters = () => {
- return [...this.props.docFilters(), ...Cast(this.props.Document._docFilters, listSpec("string"), [])];
+ return (this.props.docFilters?.() ?? Cast(this.props.Document._docFilters, listSpec("string"), []));
}
docRangeFilters = () => {
- return [...this.props.docRangeFilters(), ...Cast(this.props.Document._docRangeFilters, listSpec("string"), [])];
+ return (this.props.docRangeFilters?.() ?? Cast(this.props.Document._docRangeFilters, listSpec("string"), []));
}
searchFilterDocs = () => {
- return [...this.props.searchFilterDocs(), ...DocListCast(this.props.Document._searchFilterDocs)];
+ return this.props.searchFilterDocs?.() ?? DocListCast(this.props.Document._searchFilterDocs);
}
@computed.struct get childDocs() {
TraceMobx();