File tree Expand file tree Collapse file tree
apps/sim/lib/table/query-builder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,18 +21,20 @@ export function filterRulesToFilter(rules: FilterRule[]): Filter | null {
2121 let currentGroup : Filter = { }
2222
2323 for ( const rule of rules ) {
24- // Skip incomplete rows (no column selected) so a blank builder row never
25- // serializes to a `{ '': ... }` predicate.
26- if ( ! rule . column ) continue
27-
24+ // Honor the OR boundary before skipping incomplete rows, so an incomplete
25+ // `or` row between two valid conditions still starts a new group.
2826 const isOr = rule . logicalOperator === 'or'
29- const ruleValue = toRuleValue ( rule . operator , rule . value )
30-
3127 if ( isOr && Object . keys ( currentGroup ) . length > 0 ) {
3228 orGroups . push ( { ...currentGroup } )
3329 currentGroup = { }
3430 }
3531
32+ // Skip incomplete rows (no column selected) so a blank builder row never
33+ // serializes to a `{ '': ... }` predicate. The OR boundary above is still
34+ // applied; the row just contributes no condition.
35+ if ( ! rule . column ) continue
36+
37+ const ruleValue = toRuleValue ( rule . operator , rule . value )
3638 const existing = currentGroup [ rule . column ]
3739 currentGroup [ rule . column ] =
3840 existing === undefined
You can’t perform that action at this time.
0 commit comments