dont search when input is empty

This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-02-26 13:20:36 -08:00
1 parent c2b9680a5e
commit 77bf5213df
1 file changed
+1 -1
+1 -1
View File
@@ -36,7 +36,7 @@ export function projectSearchEntriesQueryOptions(input: {
limit,
});
},
enabled: (input.enabled ?? true) && input.cwd !== null,
enabled: (input.enabled ?? true) && input.cwd !== null && input.query.length > 0,
staleTime: input.staleTime ?? DEFAULT_SEARCH_ENTRIES_STALE_TIME,
placeholderData: (previous) => previous ?? EMPTY_SEARCH_ENTRIES_RESULT,
});