diff options
| author | Adam <[email protected]> | 2025-12-11 09:32:53 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-11 13:42:45 -0600 |
| commit | 0ca758e13516d96180cc11631e02e5f7929ba4b0 (patch) | |
| tree | caeb8c09a2027991cc007339eb0e68f56b6db628 /packages/ui/src | |
| parent | ea8508ee44848e9ff225ab9764ab1779b641b7c0 (diff) | |
| download | opencode-0ca758e13516d96180cc11631e02e5f7929ba4b0.tar.gz opencode-0ca758e13516d96180cc11631e02e5f7929ba4b0.zip | |
wip(desktop): progress
Diffstat (limited to 'packages/ui/src')
| -rw-r--r-- | packages/ui/src/hooks/use-filtered-list.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ui/src/hooks/use-filtered-list.tsx b/packages/ui/src/hooks/use-filtered-list.tsx index f9745918a..e3b373d4d 100644 --- a/packages/ui/src/hooks/use-filtered-list.tsx +++ b/packages/ui/src/hooks/use-filtered-list.tsx @@ -5,7 +5,7 @@ import { createStore } from "solid-js/store" import { createList } from "solid-list" export interface FilteredListProps<T> { - items: T[] | ((filter: string) => Promise<T[]>) + items: (filter: string) => T[] | Promise<T[]> key: (item: T) => string filterKeys?: string[] current?: T @@ -22,7 +22,7 @@ export function useFilteredList<T>(props: FilteredListProps<T>) { () => store.filter, async (filter) => { const needle = filter?.toLowerCase() - const all = (typeof props.items === "function" ? await props.items(needle) : props.items) || [] + const all = (await props.items(needle)) || [] const result = pipe( all, (x) => { |
