fix: narrow note list entity selection

This commit is contained in:
lucaronin
2026-04-16 09:11:22 +02:00
parent 57a87e43b3
commit f665f089dc

View File

@@ -25,6 +25,8 @@ import {
} from './noteListHooks'
import { useChangesContextMenu } from './NoteListChangesMenu'
type EntitySelection = Extract<SidebarSelection, { kind: 'entity' }>
function useViewFlags(selection: SidebarSelection) {
const isSectionGroup = selection.kind === 'sectionGroup'
const isFolderView = selection.kind === 'folder'
@@ -370,7 +372,7 @@ function buildNoteListLayoutModel(params: {
content: ReturnType<typeof useNoteListContent>
interaction: ReturnType<typeof useNoteListInteractionState> & {
renderItem: (entry: VaultEntry) => React.ReactNode
entitySelection: SidebarSelection | null
entitySelection: EntitySelection | null
}
}) {
return {