diff options
| author | bobzel <zzzman@gmail.com> | 2025-02-08 14:19:41 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-02-08 14:19:41 -0500 |
| commit | bb624694da02a56ce10e3bfa4c75957592e3a86d (patch) | |
| tree | 79e33303fd2921960169704d8810f88fc4cb555a /src/client/views/collections/FlashcardPracticeUI.tsx | |
| parent | d72977ad8b67f2575cad8aea988fcfa7c04f794a (diff) | |
| parent | 392143a84250df3742bc2f52d358fec25877e4de (diff) | |
merged
Diffstat (limited to 'src/client/views/collections/FlashcardPracticeUI.tsx')
| -rw-r--r-- | src/client/views/collections/FlashcardPracticeUI.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/FlashcardPracticeUI.tsx b/src/client/views/collections/FlashcardPracticeUI.tsx index 77f1db9ad..c071c5fb8 100644 --- a/src/client/views/collections/FlashcardPracticeUI.tsx +++ b/src/client/views/collections/FlashcardPracticeUI.tsx @@ -58,7 +58,7 @@ export class FlashcardPracticeUI extends ObservableReactComponent<PracticeUIProp get practiceField() { return this._props.fieldKey + "_practice"; } // prettier-ignore @computed get filterDoc() { return DocListCast(Doc.MyContextMenuBtns.data).find(doc => doc.title === 'Filter'); } // prettier-ignore - @computed get practiceMode() { return this._props.allChildDocs().some(doc => doc._flashcardType) ? StrCast(this._props.layoutDoc.practiceMode) : ''; } // prettier-ignore + @computed get practiceMode() { return this._props.allChildDocs().some(doc => doc._layout_flashcardType) ? StrCast(this._props.layoutDoc.practiceMode) : ''; } // prettier-ignore btnHeight = () => NumCast(this.filterDoc?.height) * Math.min(1, this._props.ScreenToLocalBoxXf().Scale); btnWidth = () => (!this.filterDoc ? 1 : (this.btnHeight() * NumCast(this.filterDoc._width)) / NumCast(this.filterDoc._height)); @@ -179,7 +179,7 @@ export class FlashcardPracticeUI extends ObservableReactComponent<PracticeUIProp </div> ); } - tryFilterOut = (doc: Doc) => (this.practiceMode && BoolCast(doc?._flashcardType) && doc[this.practiceField] === practiceVal.CORRECT ? true : false); // show only cards that aren't marked as correct + tryFilterOut = (doc: Doc) => (this.practiceMode && doc?._layout_flashcardType && doc[this.practiceField] === practiceVal.CORRECT ? true : false); // show only cards that aren't marked as correct render() { return ( <div className="FlashcardPracticeUI"> |
