foolish-indigoF
Refine•4y ago•
6 replies
foolish-indigo

How to use generic search with strapi-v4 and useTable

Hi 👋
I am listing the customers from my database with useTable hook from AntD and Strapi-v4 as data provider. I would like to implement a single search field to filter over the name, surname, email, ...

I could use the onSearch property, but it only works on a single field and the API URL is always in the following format http://apiurl/customers?filters[$field][$operator]=$value.

With Strapi, one could use the "_q" URL parameters to search over all table fields, e.g., http://apiurl/customers?_q=mySeachString . Any idea if and how I could implement this with useTable?

Cheers
Was this page helpful?