aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-03-13 16:40:26 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-03-13 16:40:26 -0500
commit74c8b78c7119e700655338a32c03f2031186b238 (patch)
tree57baf33d9230b7ea6f77addf34becae8faeb63b0 /src/client/views/collections/CollectionView.tsx
parent70a5edc6e9a203141b16fd31ee9a1a26ebae2188 (diff)
parente20a8916483734bb06d08409b6bc804c2391a289 (diff)
minor changes
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 857982782..be5a4b852 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -72,6 +72,8 @@ export interface CollectionViewProps extends FieldViewProps {
children?: never | (() => JSX.Element[]) | React.ReactNode;
childDocuments?: Doc[]; // used to override the documents shown by the sub collection to an explicit list (see LinkBox)
childOpacity?: () => number;
+ childHideTitle?: () => boolean; // whether to hide the documentdecorations title for children
+ childHideDecorationTitle?: () => boolean;
childLayoutTemplate?: () => (Doc | undefined);// specify a layout Doc template to use for children of the collection
childLayoutString?: string;
childFreezeDimensions?: boolean; // used by TimeView to coerce documents to treat their width height as their native width/height
@@ -102,13 +104,15 @@ export class CollectionView extends Touchable<CollectionViewProps> {
return viewField as any as CollectionViewType;
}
- active = (outsideReaction?: boolean) => (this.props.isSelected(outsideReaction) ||
- this.props.rootSelected(outsideReaction) ||
- (this.props.layerProvider?.(this.props.Document) !== false && (this.props.Document.forceActive || this.props.Document._isGroup)) ||
- this._isChildActive ||
- this.props.renderDepth === 0) ?
- true :
- false
+ active = (outsideReaction?: boolean) => {
+ return this.props.renderDepth === 0 ||
+ this.props.isSelected(outsideReaction) ||
+ this.props.rootSelected(outsideReaction) ||
+ (this.props.layerProvider?.(this.props.Document) !== false && (this.props.Document.forceActive || this.props.Document._isGroup)) ||
+ this._isChildActive ?
+ true :
+ false;
+ }
whenActiveChanged = (isActive: boolean) => this.props.whenActiveChanged(this._isChildActive = isActive);