diff --git a/web-common/src/features/visual-editing/SelectionDropdown.svelte b/web-common/src/features/visual-editing/SelectionDropdown.svelte index 0fe62df57d7..4fc6f6283ee 100644 --- a/web-common/src/features/visual-editing/SelectionDropdown.svelte +++ b/web-common/src/features/visual-editing/SelectionDropdown.svelte @@ -124,7 +124,7 @@ if (selectedItems.size === allItems.size) { setItems([]); } else { - setItems(Array.from(allItems)); + setItems(Array.from(allItems), excludeMode); } }} type="plain" diff --git a/web-common/src/features/workspaces/VisualExploreEditing.svelte b/web-common/src/features/workspaces/VisualExploreEditing.svelte index 97e4e2122cd..e3ceeec10f7 100644 --- a/web-common/src/features/workspaces/VisualExploreEditing.svelte +++ b/web-common/src/features/workspaces/VisualExploreEditing.svelte @@ -391,6 +391,12 @@ selectedItems={subsets[type]} excludeMode={excludeMode[type]} mode={fields[type]} + onSelectAll={async () => { + await updateProperties({ [type]: "*" }); + }} + onSelectExpression={async () => { + await updateProperties({ [type]: { expr: "*" } }); + }} setItems={async (items, exclude) => { const deleteKeys = [["defaults", type]]; if (type === "dimensions") { @@ -404,12 +410,6 @@ await updateProperties({ [type]: items }, deleteKeys); } }} - onSelectAll={async () => { - await updateProperties({ [type]: "*" }); - }} - onSelectExpression={async () => { - await updateProperties({ [type]: { expr: "*" } }); - }} onExpressionBlur={async (value) => { const deleteKeys = [["defaults", type]]; if (type === "dimensions") { @@ -430,10 +430,17 @@ deleteKeys.push(["defaults", "comparison_mode"]); } - await updateProperties( - { [type]: Array.from(subsets[type]) }, - deleteKeys, - ); + if (excludeMode[type]) { + await updateProperties( + { [type]: { exclude: Array.from(subsets[type]) } }, + deleteKeys, + ); + } else { + await updateProperties( + { [type]: Array.from(subsets[type]) }, + deleteKeys, + ); + } }} /> {/each}