mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
fix(ui): track memo-based items in useFilteredList without affecting async function based lists (#8216)
Co-authored-by: neriousy <neriousy@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,11 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
|
||||
const [grouped, { refetch }] = createResource(
|
||||
() => ({
|
||||
filter: store.filter,
|
||||
items: typeof props.items === "function" ? undefined : props.items,
|
||||
items: typeof props.items === "function"
|
||||
? props.items.length === 0
|
||||
? (props.items as () => T[])()
|
||||
: undefined
|
||||
: props.items,
|
||||
}),
|
||||
async ({ filter, items }) => {
|
||||
const needle = filter?.toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user