Account for logicalOperator inside UISearchFilter groups
This commit is contained in:
parent
336bd9730a
commit
721b3ab610
|
@ -488,7 +488,13 @@ export function buildQuery(
|
||||||
if (onEmptyFilter) {
|
if (onEmptyFilter) {
|
||||||
query.onEmptyFilter = onEmptyFilter
|
query.onEmptyFilter = onEmptyFilter
|
||||||
}
|
}
|
||||||
const operator = allOr ? LogicalOperator.OR : LogicalOperator.AND
|
|
||||||
|
// logicalOperator takes precendence over allOr
|
||||||
|
let operator = allOr ? LogicalOperator.OR : LogicalOperator.AND
|
||||||
|
if (group.logicalOperator) {
|
||||||
|
operator = logicalOperatorFromUI(group.logicalOperator)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[operator]: { conditions: filters.map(buildCondition).filter(f => f) },
|
[operator]: { conditions: filters.map(buildCondition).filter(f => f) },
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue