Closed cpursley closed 4 years ago
While much more involved, it would also be neat to be able to search across multiple fields/columns. Maybe something like this (I'm not sure the best approach for delineating the sources) :
<TextInput label="Search" source="title@ilike,body@like,author@similar" alwaysOn />
@cpursley its already supported (not multiple but for a single field it should work as expected)
In that case @Steams ~ can you make a note of search usage in the README?
Also, how involved do you think a feature for searching across multiple fields would be? I imagine you'd have to generate multiple query params (instead of just the one) that Hasura would understand, so effectively like having multiple Search inputs.
can you make a note of search usage in the README?
@cpursley maybe you can contribute to that too?
Btw. @cpursley if you would like to implement your multifield-search idea, the changes should go somewhere here: https://github.com/webdeb/ra-data-hasura-graphql/blob/master/src/buildVariables.js#L37
can you make a note of search usage in the README?
@cpursley maybe you can contribute to that too?
Steams and I are working together on a project that utilizes this library (me on the backend) :)
https://hasura.io/docs/1.0/graphql/manual/queries/query-filters.html#text-search-or-pattern-matching-operators-like-similar-etc
This is an interesting approach:
https://github.com/raphiniert-com/ra-data-postgrest#special-filter-feature