ukrbublik/react-awesome-query-builder

Support "Combinators between rules"

Opened this issue · 1 comments

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

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.