From cbdf7c8bd1493f0346266dfaa0de93ab42b9ac48 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 10 Oct 2022 12:11:29 +0100 Subject: [PATCH] Adjustments to accomodate the updates scanner type --- .../src/components/design/settings/componentSettings.js | 2 +- .../components/design/settings/controls/FormFieldSelect.svelte | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 4e9b624f12..c3b81968f4 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -51,7 +51,7 @@ const componentMap = { "field/link": FormFieldSelect, "field/array": FormFieldSelect, "field/json": FormFieldSelect, - "field/barcodeqr": FormFieldSelect, + "field/barcode/qr": FormFieldSelect, // Some validation types are the same as others, so not all types are // explicitly listed here. e.g. options uses string validation "validation/string": ValidationEditor, diff --git a/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte b/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte index 18653f51a3..c00079420a 100644 --- a/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte @@ -26,7 +26,7 @@ let entries = Object.entries(schema ?? {}) let types = [] - if ((type === "field/options", type === "field/barcodeqr")) { + if ((type === "field/options", type === "field/barcode/qr")) { // allow options to be used on both options and string fields types = [type, "field/string"] } else { @@ -35,7 +35,6 @@ types = types.map(type => type.split("/")[1]) entries = entries.filter(entry => types.includes(entry[1].type)) - return entries.map(entry => entry[0]) }