From c9589c1edc958a68698dfdd3ea51c208a7ca00b2 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Tue, 4 Jul 2023 08:34:59 +0100 Subject: [PATCH] Apply column order for Grid block (#11099) * Apply column order for Grid block * Refactor * Do not allow column reorder for Grid block * Refactor --- .../components/design/settings/componentSettings.js | 2 ++ .../settings/controls/ColumnEditor/ColumnDrawer.svelte | 5 +++++ .../settings/controls/ColumnEditor/ColumnEditor.svelte | 2 ++ .../controls/ColumnEditor/GridColumnEditor.svelte | 10 ++++++++++ packages/client/manifest.json | 2 +- 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 packages/builder/src/components/design/settings/controls/ColumnEditor/GridColumnEditor.svelte diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 31f51bf468..b3b9fb6577 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -20,6 +20,7 @@ import ValidationEditor from "./controls/ValidationEditor/ValidationEditor.svelt import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte" import ColumnEditor from "./controls/ColumnEditor/ColumnEditor.svelte" import BasicColumnEditor from "./controls/ColumnEditor/BasicColumnEditor.svelte" +import GridColumnEditor from "./controls/ColumnEditor/GridColumnEditor.svelte" import BarButtonList from "./controls/BarButtonList.svelte" import FieldConfiguration from "./controls/FieldConfiguration/FieldConfiguration.svelte" @@ -47,6 +48,7 @@ const componentMap = { fieldConfiguration: FieldConfiguration, columns: ColumnEditor, "columns/basic": BasicColumnEditor, + "columns/grid": GridColumnEditor, "field/sortable": SortableFieldSelect, "field/string": FormFieldSelect, "field/number": FormFieldSelect, diff --git a/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnDrawer.svelte b/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnDrawer.svelte index 6e57d20751..f249245b34 100644 --- a/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/ColumnEditor/ColumnDrawer.svelte @@ -18,6 +18,7 @@ export let options = [] export let schema = {} export let allowCellEditing = true + export let allowReorder = true const flipDurationMs = 150 let dragDisabled = true @@ -110,6 +111,7 @@ {#each columns as column (column.id)}