efficient-indigoE
Refine2y ago
3 replies
efficient-indigo

Question no setFilter

Hi I am new to refine.
One of my projects require a dropdown to filter results from table. I find that by setting the filter to an empty array won't clear all the filter, instead I need to set the value in the filter to
undefined
,is it a correct way to do?

e.g.
setFilter([]) not work
setFilter(
[{
  "field": "location_id",
  "operator": "in",
  "value": undefined,
}]
)

this works
Was this page helpful?