question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEAT] Add support for `and` conditional filter

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Smartmind12commented, Oct 6, 2022

@omeraplak Can i work on this issue if not already taken?

I guess no one has yet. If you plan to do so, we can assign it to you. When do you plan to do it?

I would like to work on it just now!

0reactions
IgnusGcommented, Oct 17, 2022

Thanks @omeraplak, that’s amazing! Great work @omeraplak and @yildirayunlu 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

supports - CSS: Cascading Style Sheets - MDN Web Docs
The @supports at-rule consists of a block of statements with a supports condition. The supports condition is a set of one or more...
Read more >
Filter for applications in Conditional Access policy (Preview)
Application filters are a new feature for Conditional Access that allows organizations to tag service principals with custom attributes. These ...
Read more >
Set Conditional Filter - YouTube
The set_conditional filter allows you to perform conditional logic through a filter. You are able to set a path and value of an...
Read more >
Workday Inbox Filter Job Aid - UW ISC
Inbox filters are customizable filters that allow you to quickly sift ... Conditions: The condition + symbol will add one or more conditions...
Read more >
mehdi-fathi/eloquent-filter - GitHub
GitHub - mehdi-fathi/eloquent-filter: Eloquent Filter is a package for filter data of models ... But you'd have to add a condition for each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found