You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On one of our React-Admin pages, we have to filter a list on an enum field, keeping only rows whose value for this field is in a subset selected by the user in a CheckboxGroupInput component :
The source property here is expressed in the syntax expected by this library, so the in query filter type is correctly translated into enumfield=in. in the query to be sent to the server.
However, the filter value coming from the input component is an array of strings (e.g., ["a", "c"] if only boxes A and C are checked), and it looks like there is no support for that in this library. Indeed, what we get in the final URL filter is enumfield=in.a,c whereas it should be enumfield=in.(a,c) according to the PostgREST syntax. Could you please confirm that ?
If you are open to contributions, we could propose a fix by adding a case for the in query filter type in the parseFilters function in urlBuilder.ts, if that makes sense.
Thanks for your help.
The text was updated successfully, but these errors were encountered:
Hello.
On one of our React-Admin pages, we have to filter a list on an enum field, keeping only rows whose value for this field is in a subset selected by the user in a
CheckboxGroupInput
component :The
source
property here is expressed in the syntax expected by this library, so thein
query filter type is correctly translated intoenumfield=in.
in the query to be sent to the server.However, the filter value coming from the input component is an array of strings (e.g.,
["a", "c"]
if only boxesA
andC
are checked), and it looks like there is no support for that in this library. Indeed, what we get in the final URL filter isenumfield=in.a,c
whereas it should beenumfield=in.(a,c)
according to the PostgREST syntax. Could you please confirm that ?If you are open to contributions, we could propose a fix by adding a case for the
in
query filter type in theparseFilters
function inurlBuilder.ts
, if that makes sense.Thanks for your help.
The text was updated successfully, but these errors were encountered: