mirror of
https://github.com/zadam/trilium.git
synced 2026-07-28 17:11:20 +02:00
fix(note_list): not rendering correctly when switching notes
This commit is contained in:
@@ -56,7 +56,7 @@ export default function NoteList(props: Pick<NoteListProps, "displayOnlyCollecti
|
||||
const [ enabled, setEnabled ] = useState(noteContext?.hasNoteList());
|
||||
useEffect(() => {
|
||||
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} />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user