diff options
| author | geireann <geireann.lindfield@gmail.com> | 2023-11-30 16:00:13 -0500 |
|---|---|---|
| committer | geireann <geireann.lindfield@gmail.com> | 2023-11-30 16:00:13 -0500 |
| commit | c918198a37e4ad5306b70a90ca1b3fcab2e28f76 (patch) | |
| tree | 1733a96358c2dcb949480416245bc3d6354966c7 /src/client/views/collections/CollectionSubView.tsx | |
| parent | ab1688962875073fa59a4a97303d0e0f0398ba5d (diff) | |
fixed rootSelected prop to be optional. fixed fonticont toggle to pass 'self' even though it's deprecated.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index 8896e2d61..9dcd09b17 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -6,7 +6,7 @@ import { AclPrivate } from '../../../fields/DocSymbols'; import { Id } from '../../../fields/FieldSymbols'; import { List } from '../../../fields/List'; import { listSpec } from '../../../fields/Schema'; -import { Cast, ScriptCast, StrCast } from '../../../fields/Types'; +import { BoolCast, Cast, ScriptCast, StrCast } from '../../../fields/Types'; import { WebField } from '../../../fields/URLField'; import { GetEffectiveAcl, TraceMobx } from '../../../fields/util'; import { GestureUtils } from '../../../pen-gestures/GestureUtils'; @@ -60,7 +60,7 @@ export function CollectionSubView<X>(moreProps?: X) { } // this returns whether either the collection is selected, or the template that it is part of is selected - rootSelected = () => this.props.isSelected() || this.props.rootSelected(); + rootSelected = () => this.props.isSelected() || BoolCast(this.Document.rootDocument && this.props.rootSelected?.()); // The data field for rendering this collection will be on the this.props.Document unless we're rendering a template in which case we try to use props.DataDoc. // When a document has a DataDoc but it's not a template, then it contains its own rendering data, but needs to pass the DataDoc through |
