TanStackT
TanStack3y ago
3 replies
verbal-lime

Return empty result on empty filter

Hey,
what's the best way in tanstack query for following use-case?

There's a filter input. Initially the query is disabled and no results are shown. When the user fills the filter input and presses a button, the query should be executed and the results are shown. When the filter input is cleared again (this is the part, where I do not know, how to handle it best), the result should also be cleared.
Thanks
Was this page helpful?