diff --git a/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte b/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte index c00079420a..a02ea41099 100644 --- a/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/FormFieldSelect.svelte @@ -24,16 +24,16 @@ const getOptions = (schema, type) => { let entries = Object.entries(schema ?? {}) - let types = [] - if ((type === "field/options", type === "field/barcode/qr")) { + if (type === "field/options" || type === "field/barcode/qr") { // allow options to be used on both options and string fields types = [type, "field/string"] } else { types = [type] } - types = types.map(type => type.split("/")[1]) + types = types.map(type => type.slice(type.indexOf("/") + 1)) + entries = entries.filter(entry => types.includes(entry[1].type)) return entries.map(entry => entry[0]) } diff --git a/packages/client/src/components/app/forms/CodeScanner.svelte b/packages/client/src/components/app/forms/CodeScanner.svelte index 8728e707dd..5dff3a96fa 100644 --- a/packages/client/src/components/app/forms/CodeScanner.svelte +++ b/packages/client/src/components/app/forms/CodeScanner.svelte @@ -2,13 +2,12 @@ import { ModalContent, Modal, Icon, ActionButton } from "@budibase/bbui" import { Input, Button, StatusLight } from "@budibase/bbui" import { Html5Qrcode } from "html5-qrcode" + import { createEventDispatcher } from "svelte" export let value export let disabled = false export let allowManualEntry = false export let scanButtonText = "Scan code" - - import { createEventDispatcher } from "svelte" const dispatch = createEventDispatcher() let videoEle diff --git a/packages/client/src/components/app/forms/CodeScannerField.svelte b/packages/client/src/components/app/forms/CodeScannerField.svelte index 4f4a84bfbc..7e020aa9c7 100644 --- a/packages/client/src/components/app/forms/CodeScannerField.svelte +++ b/packages/client/src/components/app/forms/CodeScannerField.svelte @@ -41,7 +41,7 @@ on:change={handleUpdate} disabled={fieldState.disabled} {allowManualEntry} - {scanText} + scanButtonText={scanText} /> {/if}