fix(filters): group mode reads AND/OR, connective labels toggle it (user report)
The ALL/ANY pills required mapping ALL→AND, ANY→OR that nobody should have to learn. The pills now say AND / OR directly (wire values stay all|any — server contract untouched), and the AND/OR text between sibling rules became a clickable toggle for its parent group, so the switch lives exactly where you're looking.
This commit is contained in:
1 parent
04b36f0563
commit
6f98ca4c22
5 files changed
+32
-6
No files matched your search
@@ -492,6 +492,15 @@ export function filterBuilderData() {
|
||||
(node as FilterGroupState).mode = mode;
|
||||
this._touch();
|
||||
},
|
||||
// toggleGroupMode flips a group between AND and OR (the clickable
|
||||
// connective between rules targets its parent group).
|
||||
toggleGroupMode(parentPath: number[]): void {
|
||||
const node = this.nodeAt(parentPath);
|
||||
if (!node || !("children" in node)) return;
|
||||
const group = node as FilterGroupState;
|
||||
group.mode = group.mode === "all" ? "any" : "all";
|
||||
this._touch();
|
||||
},
|
||||
setRuleField(path: number[], key: string): void {
|
||||
const node = this.nodeAt(path);
|
||||
if (!node || !isRule(node)) return;
|
||||
|
||||
Reference in new issue
Block a user