Skip to content

Commit d1d1d05

Browse files
committed
fix(collections): children warning stuck when changing view mode
1 parent c62a03c commit d1d1d05

File tree

1 file changed

+1
-1
lines changed
  • apps/client/src/widgets/type_widgets

1 file changed

+1
-1
lines changed

apps/client/src/widgets/type_widgets/Book.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Book({ note }: TypeWidgetProps) {
1616
setShouldDisplayNoChildrenWarning(!note.hasChildren() && VIEW_TYPES.includes(viewType ?? ""));
1717
}
1818

19-
useEffect(refresh, [ note ]);
19+
useEffect(refresh, [ note, viewType ]);
2020
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
2121
if (loadResults.getBranchRows().some(branchRow => branchRow.parentNoteId === note.noteId)) {
2222
refresh();

0 commit comments

Comments
 (0)