Search files as the user types
The Files page and the conversation's files modal searched only on Enter. Both now search by name or path a moment after the last keystroke (useDebouncedValue, AppData.SearchDebounceMs), clearing shows the whole list at once, and the modal drops an answer a newer request overtook. The Files search box no longer locks while a folder loads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -21,7 +21,6 @@ type Props = {
|
||||
loading?: boolean;
|
||||
error?: string;
|
||||
onSearch: (search: string) => void;
|
||||
onSubmitSearch: () => void;
|
||||
onOpenFolder: (path: string) => void;
|
||||
onOpenVolume: (option: StorageSpecOption) => void;
|
||||
};
|
||||
@@ -40,7 +39,6 @@ export default function FilesBrowser({
|
||||
loading,
|
||||
error,
|
||||
onSearch,
|
||||
onSubmitSearch,
|
||||
onOpenFolder,
|
||||
onOpenVolume,
|
||||
}: Props) {
|
||||
@@ -89,12 +87,7 @@ export default function FilesBrowser({
|
||||
crumbs={folder?.breadcrumbs || []}
|
||||
onOpenFolder={onOpenFolder}
|
||||
/>
|
||||
<FilesSearchInput
|
||||
value={search}
|
||||
loading={loading}
|
||||
onChange={onSearch}
|
||||
onSubmit={onSubmitSearch}
|
||||
/>
|
||||
<FilesSearchInput value={search} onChange={onSearch} />
|
||||
<Stack className="w-full mt-2 gap-0! items-stretch">
|
||||
{folder?.entries.length ? (
|
||||
folder.entries.map((entry) => (
|
||||
|
||||
Reference in New Issue
Block a user