Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(collections/list): not reacting to expand/collapse button (closes #7209)
Elian Doran69a59f09359f
diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsxindex b88812d729..274ef21110 100644--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx@@ -59,8 +59,8 @@ function ListNoteCard({ note, parentNote, expand, highlightedTokens }: { note: Fconst [ isExpanded, setExpanded ] = useState(expand);const notePath = getNotePath(parentNote, note);- // Reset expand state if switching to another note.- useEffect(() => setExpanded(expand), [ note ]);+ // Reset expand state if switching to another note, or if user manually toggled expansion state.+ useEffect(() => setExpanded(expand), [ note, expand ]);return (<div