diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte index ef4726751b..1524459d57 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte @@ -15,6 +15,7 @@ export let columns = [] export let options = [] + export let schema = {} const flipDurationMs = 150 let dragDisabled = true @@ -61,11 +62,22 @@ dragDisabled = true } + const addAllColumns = () => { + let newColumns = [] + options.forEach(field => { + const fieldSchema = schema[field] + if (!fieldSchema?.autocolumn) { + newColumns.push({ + name: field, + displayName: field, + }) + } + }) + columns = newColumns + } + const reset = () => { - columns = options.map(col => ({ - name: col, - displayName: col, - })) + columns = [] } @@ -78,6 +90,7 @@
+