fix(collections/list): not reacting to expand/collapse button (closes #7209)

This commit is contained in:
Elian Doran 2025-10-06 18:55:02 +03:00
parent fa7575ed00
commit 69a59f0935
No known key found for this signature in database

View File

@ -59,8 +59,8 @@ function ListNoteCard({ note, parentNote, expand, highlightedTokens }: { note: F
const [ 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