What's Changed
- [Feature #1417] Add
OR
operator to Filters by @salihozdemir and @IgnusG in #1598
🥁 With the new version, the filter type will change and you will be able to create two different filter objects as follows:
filter = [
{
operator: "eq",
field: "age",
value: 20
},
{
operator: "or",
value: [
{
field: "title",
operator: "eq",
value: "Test",
},
{
field: "description",
operator: "eq",
value: "Test"
}
]
}
]
🎯 Here the query would look like "age" == 20 AND ("title" == "Test" OR "description" == "Test")
With this usage, the field
property can be undefined, so you'll need to handle this in your dataProvider that you create yourself. But great news for you, we added this feature to data providers that we support built-in. You can update and start using it immediately.
Supported Data Providers
- Nestjsx-Crud
- Strapi-v4
- Strapi
- Strapi Graphql
- Supabase
- Hasura
- Nhost