diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-09 23:43:59 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-09 23:43:59 -0400 |
| commit | a760773be31c274af45a7d781160585d58d88c07 (patch) | |
| tree | a09dfb3afdb731a38d87fd9115d3d844d5a96919 /src/client/views/collections/CollectionCardDeckView.tsx | |
| parent | 530b598e4e994bb566bcd289e95d05ddd1ecf86c (diff) | |
changed flashcard revealOp to be set on collection, not individual flashcards
Diffstat (limited to 'src/client/views/collections/CollectionCardDeckView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionCardDeckView.tsx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx index 8f351d8a7..8807462c3 100644 --- a/src/client/views/collections/CollectionCardDeckView.tsx +++ b/src/client/views/collections/CollectionCardDeckView.tsx @@ -332,14 +332,16 @@ export class CollectionCardView extends CollectionSubView() { return docs; }; - isChildContentActive = () => - this._props.isContentActive?.() === false - ? false - : this._props.isDocumentActive?.() && (this._props.childDocumentsActive?.() || BoolCast(this.Document.childDocumentsActive)) - ? true - : this._props.childDocumentsActive?.() === false || this.Document.childDocumentsActive === false + isChildContentActive = computedFn( + (doc: Doc) => () => + this._props.isContentActive?.() === false ? false - : undefined; + : this._props.isDocumentActive?.() && this.curDoc() === doc + ? true + : this._props.childDocumentsActive?.() === false || this.Document.childDocumentsActive === false + ? false + : undefined + ); // prettier-ignore displayDoc = (doc: Doc, screenToLocalTransform: () => Transform) => ( <DocumentView @@ -362,7 +364,7 @@ export class CollectionCardView extends CollectionSubView() { dragAction={(this.Document.childDragAction ?? this._props.childDragAction) as dropActionType} showTags={BoolCast(this.layoutDoc.showChildTags)} whenChildContentsActiveChanged={this._props.whenChildContentsActiveChanged} - isContentActive={this.isChildContentActive} + isContentActive={this.isChildContentActive(doc)} dontHideOnDrag /> ); |
