diff --git a/packages/ui/src/hooks/use-filtered-list.tsx b/packages/ui/src/hooks/use-filtered-list.tsx index b6bd7d5c6c0..23f7709795f 100644 --- a/packages/ui/src/hooks/use-filtered-list.tsx +++ b/packages/ui/src/hooks/use-filtered-list.tsx @@ -23,10 +23,11 @@ export function useFilteredList(props: FilteredListProps) { const [grouped, { refetch }] = createResource( () => { - // When items is a function (not async filter function), call it to track changes const itemsValue = typeof props.items === "function" - ? (props.items as () => T[])() // Call synchronous function to track it + ? props.items.length === 0 + ? (props.items as () => T[])() + : undefined : props.items return {