fix(note_list): not rendering correctly when switching notes

This commit is contained in:
Elian Doran 2025-11-25 19:51:03 +02:00
parent d6de7cca96
commit 976b1e1e0f
No known key found for this signature in database

View File

@ -56,7 +56,7 @@ export default function NoteList(props: Pick<NoteListProps, "displayOnlyCollecti
const [ enabled, setEnabled ] = useState(noteContext?.hasNoteList()); const [ enabled, setEnabled ] = useState(noteContext?.hasNoteList());
useEffect(() => { useEffect(() => {
setEnabled(noteContext?.hasNoteList()); setEnabled(noteContext?.hasNoteList());
}, [ noteContext, viewType, viewScope?.viewMode ]) }, [ note, noteContext, viewType, viewScope?.viewMode ])
return <CustomNoteList viewType={viewType} note={note} isEnabled={!!enabled} notePath={notePath} ntxId={ntxId} {...props} /> return <CustomNoteList viewType={viewType} note={note} isEnabled={!!enabled} notePath={notePath} ntxId={ntxId} {...props} />
} }