From 167f8f368bd27f721a8c7e662f022748d5852636 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 13 Oct 2022 15:58:44 +0100 Subject: [PATCH] Only show sortable fields for sort column settings --- .../design/settings/componentSettings.js | 2 + .../controls/SortableFieldSelect.svelte | 47 +++++++++++++++++++ packages/client/manifest.json | 8 ++-- 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 packages/builder/src/components/design/settings/controls/SortableFieldSelect.svelte diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 56ae3de490..6b109f80c3 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -7,6 +7,7 @@ import TableSelect from "./controls/TableSelect.svelte" import ColorPicker from "./controls/ColorPicker.svelte" import { IconSelect } from "./controls/IconSelect" import FieldSelect from "./controls/FieldSelect.svelte" +import SortableFieldSelect from "./controls/SortableFieldSelect.svelte" import MultiFieldSelect from "./controls/MultiFieldSelect.svelte" import SearchFieldSelect from "./controls/SearchFieldSelect.svelte" import SchemaSelect from "./controls/SchemaSelect.svelte" @@ -41,6 +42,7 @@ const componentMap = { filter: FilterEditor, url: URLSelect, columns: ColumnEditor, + "field/sortable": SortableFieldSelect, "field/string": FormFieldSelect, "field/number": FormFieldSelect, "field/options": FormFieldSelect, diff --git a/packages/builder/src/components/design/settings/controls/SortableFieldSelect.svelte b/packages/builder/src/components/design/settings/controls/SortableFieldSelect.svelte new file mode 100644 index 0000000000..21ed68ce68 --- /dev/null +++ b/packages/builder/src/components/design/settings/controls/SortableFieldSelect.svelte @@ -0,0 +1,47 @@ + + +