From f665f089dc86bc009645e89dce5ac705389ed0a0 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Thu, 16 Apr 2026 09:11:22 +0200 Subject: [PATCH] fix: narrow note list entity selection --- src/components/note-list/useNoteListModel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/note-list/useNoteListModel.tsx b/src/components/note-list/useNoteListModel.tsx index f5e680c5..a7a7d37c 100644 --- a/src/components/note-list/useNoteListModel.tsx +++ b/src/components/note-list/useNoteListModel.tsx @@ -25,6 +25,8 @@ import { } from './noteListHooks' import { useChangesContextMenu } from './NoteListChangesMenu' +type EntitySelection = Extract + function useViewFlags(selection: SidebarSelection) { const isSectionGroup = selection.kind === 'sectionGroup' const isFolderView = selection.kind === 'folder' @@ -370,7 +372,7 @@ function buildNoteListLayoutModel(params: { content: ReturnType interaction: ReturnType & { renderItem: (entry: VaultEntry) => React.ReactNode - entitySelection: SidebarSelection | null + entitySelection: EntitySelection | null } }) { return {