mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(collections/list): not reacting to expand/collapse button (closes #7209)
This commit is contained in:
parent
fa7575ed00
commit
69a59f0935
@ -59,8 +59,8 @@ function ListNoteCard({ note, parentNote, expand, highlightedTokens }: { note: F
|
|||||||
const [ isExpanded, setExpanded ] = useState(expand);
|
const [ isExpanded, setExpanded ] = useState(expand);
|
||||||
const notePath = getNotePath(parentNote, note);
|
const notePath = getNotePath(parentNote, note);
|
||||||
|
|
||||||
// Reset expand state if switching to another note.
|
// Reset expand state if switching to another note, or if user manually toggled expansion state.
|
||||||
useEffect(() => setExpanded(expand), [ note ]);
|
useEffect(() => setExpanded(expand), [ note, expand ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user