From e7becbf84947dd54317791ed9e6fa92d88f3abfb Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 21 Nov 2022 14:48:26 +0000 Subject: [PATCH] Remove duplication --- .../design/settings/componentSettings.js | 2 +- .../ColumnEditor/BasicColumnEditor.svelte | 83 ++----------------- .../controls/ColumnEditor/ColumnEditor.svelte | 9 +- packages/client/manifest.json | 5 +- 4 files changed, 17 insertions(+), 82 deletions(-) diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 05cc4ecc14..1d8df7a052 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -43,7 +43,7 @@ const componentMap = { filter: FilterEditor, url: URLSelect, columns: ColumnEditor, - allowedFields: BasicColumnEditor, + "columns/basic": BasicColumnEditor, "field/sortable": SortableFieldSelect, "field/string": FormFieldSelect, "field/number": FormFieldSelect, diff --git a/packages/builder/src/components/design/settings/controls/ColumnEditor/BasicColumnEditor.svelte b/packages/builder/src/components/design/settings/controls/ColumnEditor/BasicColumnEditor.svelte index 4aafc71d54..1aaf325099 100644 --- a/packages/builder/src/components/design/settings/controls/ColumnEditor/BasicColumnEditor.svelte +++ b/packages/builder/src/components/design/settings/controls/ColumnEditor/BasicColumnEditor.svelte @@ -1,83 +1,12 @@ -Configure columns - - - Configure the columns in your dynamic filter. - - - - + dispatch("change", e.detail)} + allowCellEditing={false} +/> diff --git a/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnEditor.svelte b/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnEditor.svelte index 132f856492..04cde4260f 100644 --- a/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnEditor.svelte +++ b/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnEditor.svelte @@ -11,6 +11,7 @@ export let componentInstance export let value = [] + export let allowCellEditing = true const dispatch = createEventDispatcher() @@ -73,5 +74,11 @@ Configure the columns in your table. - + diff --git a/packages/client/manifest.json b/packages/client/manifest.json index ebbd185497..996500c4c6 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -3940,11 +3940,10 @@ "required": true }, { - "type": "allowedFields", + "type": "columns/basic", "label": "Allowed filter columns", "key": "allowedFields", - "dependsOn": "dataProvider", - "nested": true + "dependsOn": "dataProvider" }, { "type": "select",