From d1d1d05ce7da8e85bf6a4ad5ce3dc333598e63fd Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 18 Nov 2025 08:39:58 +0200 Subject: [PATCH] fix(collections): children warning stuck when changing view mode --- apps/client/src/widgets/type_widgets/Book.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/widgets/type_widgets/Book.tsx b/apps/client/src/widgets/type_widgets/Book.tsx index b1ed94d68..6b796f6b6 100644 --- a/apps/client/src/widgets/type_widgets/Book.tsx +++ b/apps/client/src/widgets/type_widgets/Book.tsx @@ -16,7 +16,7 @@ export default function Book({ note }: TypeWidgetProps) { setShouldDisplayNoChildrenWarning(!note.hasChildren() && VIEW_TYPES.includes(viewType ?? "")); } - useEffect(refresh, [ note ]); + useEffect(refresh, [ note, viewType ]); useTriliumEvent("entitiesReloaded", ({ loadResults }) => { if (loadResults.getBranchRows().some(branchRow => branchRow.parentNoteId === note.noteId)) { refresh();