I found 1 solutions. Parse all filters in array as JSON and then send that JSON as query param to server. Is it good approach?
writen by Dobroslav Radosavljevič
Not an expert on this, but do you know: https://tanstack.com/table/v8
writen by Justyna Ilczuk
https://github.com/TanStack/table - very popular 18k+ starts on github
writen by Justyna Ilczuk
I’m not looking for Table solution (I’m using React Table), but I’m looking for solution how to parse array correctly and put it as query params in GET request to backend.
writen by Dobroslav Radosavljevič
Wolfgang Gassler , <@U02NH9BN5FY>, Julia Álvarez any ideas?
writen by Tiago Ferreira
Dobroslav Radosavljevič I’m a big fan of sending filters as JSON in a POST request for complex filters like this. That’s what I’m doing right now in the search engine I’ve built. Also did this in the past for complex adtech dashboards and filters on a dating site used by millions of people.
writen by Skylar Givens
Yep go with JSON + POST here. It’s well within RESTful parameters, especially for more complex or longer filters.
If it will only be a few params you could still use GET. Depending on your framework either using name=val1&name=val2
or name[]=val1&name=val2
can work for arrays in the query param as well.
writen by Benedikt