Filter reset after Search in useTable
How to reset filter after search in useTable?
2 Replies
Hi @Shyamili. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To reset the filter after a search in
useTable
, you can use the setFilters
function. You can set the filter value to undefined
, null
, or an empty array []
depending on the filter behavior you are using.
Here's an example of how to reset the filter:
Keep in mind that if you're using the merge
behavior and want to remove one of the filters, you should set the value
to undefined
or null
. For or
filters, you should set the value
to an empty array **]
to remove the filter. You can find more information about this in the [useTable documentation** (https://refine.dev/docs/api-reference/core/hooks/useTable).
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@1011493481136541737> kapa.ai is still learning and improving, please let us how it did by reacting below