[FEAT] Add support for `and` conditional filter
See original GitHub issueIs your feature request related to a problem? Please describe.
Now that the conditional or filter is available (see https://github.com/pankod/refine/issues/1417) it would be cool to have a complementary and
filter such that the following query becomes possible:
OR(
AND(
{title} == "The Great Divide",
{age} < 10,
),
AND(
{title} == "The New Era",
{age} < 20,
)
)
This would allow to construct complex filters for different situations. Currently it’s only possible to do the following:
AND(
OR(
{title} == "The Great Divide",
{title} == "The New Era",
),
OR(
{age} < 10,
{age} < 20,
)
)
One can notice however that these are not the same and the condition for the age is now not tied to the specific titles and in this example {age} < 10
actually being useless since {age} < 20
already satisfies it.
Describe the solution you’d like
An additional and
filter based on the same principle as the or
filter.
Describe alternatives you’ve considered
The top-level implicit AND
that already exists is good but does limit the queries we can construct if we need to narrow down results individually.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
I would like to work on it just now!
Thanks @omeraplak, that’s amazing! Great work @omeraplak and @yildirayunlu 🎉