Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "Combinators between rules" #1031

Open
chialunwu opened this issue Feb 26, 2024 · 1 comment
Open

Support "Combinators between rules" #1031

chialunwu opened this issue Feb 26, 2024 · 1 comment

Comments

@chialunwu
Copy link

chialunwu commented Feb 26, 2024

Is your feature request related to a problem? Please describe.
It seems we cannot configure the "AND/OR/NOT" button to be between the conditions as supported by react-query-builder

Describe the solution you'd like

Add a new setting option "Combinators between rules" to support it
Screenshot 2024-02-26 at 16 29 54

@jakeboone02
Copy link

jakeboone02 commented Mar 12, 2024

Maintainer of react-querybuilder here. I thought I should provide some more context in case this gets implemented. RQB actually has two configurations that appear this way visually.

One is showCombinatorsBetweenRules as noted above, which displays a combinator selector between each rule but keeps the combinator value itself at the group level. When any combinator selector is updated, all combinator selectors in the same group are updated to match since they are based on the same value.

The other option is to use "independent combinators" which actually tracks an independent combinator selection between each rule, allowing queries like firstName = 'Steve' AND lastName = 'Vai' OR age > 28 without using groups. Note that this requires a different query object structure. FWIW, constructing the TypeScript types to enable this option was...a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants