wet-aquaW
Refine3y ago
5 replies
wet-aqua

useList filtering

Hello, is there a way to make filters with 'OR' operator?
I want to do global search input inside my table and wonders how to do it.

I had an idea to use "contains" operator from Strapi for each field but it seems that useList is not prepared for multiple fields being filtered with "OR" operator because theres non.

Doing it like so

 filters: globalFilter
      ? [
          { field: "product_code", operator: "contains", value: globalFilter },
          { field: "name", operator: "contains", value: globalFilter },
        ]
      : undefined,


won't give me option to filter by "product"_code OR "name".

Any ideas how can I implement it?
Was this page helpful?