fix: debounce note list search

This commit is contained in:
lucaronin
2026-04-21 00:47:45 +02:00
parent 6a4046915c
commit 367a66f32a
16 changed files with 828 additions and 114 deletions

View File

@@ -192,12 +192,18 @@ export function NoteListLayout({
sidebarCollapsed,
searchVisible,
search,
isSearching,
searchInputRef,
propertyPicker,
handleSortChange,
handleCreateNote,
onOpenType,
toggleSearch,
setSearch,
handleSearchKeyDown,
noteListPanelRef,
handleNoteListPanelBlurCapture,
handleNoteListPanelFocusCapture,
handleListKeyDown,
noteListContainerRef,
handleNoteListBlur,
@@ -230,8 +236,11 @@ export function NoteListLayout({
}: NoteListLayoutProps) {
return (
<div
ref={noteListPanelRef}
className="flex flex-col select-none overflow-hidden border-r border-border bg-card text-foreground"
style={{ height: '100%' }}
onBlurCapture={handleNoteListPanelBlurCapture}
onFocusCapture={handleNoteListPanelFocusCapture}
>
<NoteListHeader
title={title}
@@ -243,12 +252,15 @@ export function NoteListLayout({
sidebarCollapsed={sidebarCollapsed}
searchVisible={searchVisible}
search={search}
isSearching={isSearching}
searchInputRef={searchInputRef}
propertyPicker={propertyPicker}
onSortChange={handleSortChange}
onCreateNote={handleCreateNote}
onOpenType={onOpenType}
onToggleSearch={toggleSearch}
onSearchChange={setSearch}
onSearchKeyDown={handleSearchKeyDown}
/>
<NoteListBody
handleListKeyDown={handleListKeyDown}