1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00

Merge pull request #9528 from Budibase/fix/qr-field-type-parsing

Parse field type configuration for invalid characters
This commit is contained in:
deanhannigan 2023-02-03 13:27:39 +00:00 committed by GitHub
commit 368e97f124
3 changed files with 4 additions and 3 deletions

View file

@ -56,7 +56,7 @@ const componentMap = {
"field/link": FormFieldSelect,
"field/array": FormFieldSelect,
"field/json": FormFieldSelect,
"field/barcode/qr": FormFieldSelect,
"field/barcodeqr": 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,

View file

@ -25,7 +25,7 @@
const getOptions = (schema, type) => {
let entries = Object.entries(schema ?? {})
let types = []
if (type === "field/options" || type === "field/barcode/qr") {
if (type === "field/options") {
// allow options to be used on both options and string fields
types = [type, "field/string"]
} else {
@ -35,6 +35,7 @@
types = types.map(type => type.slice(type.indexOf("/") + 1))
entries = entries.filter(entry => types.includes(entry[1].type))
return entries.map(entry => entry[0])
}
</script>

View file

@ -3241,7 +3241,7 @@
},
"settings": [
{
"type": "field/barcode/qr",
"type": "field/barcodeqr",
"label": "Field",
"key": "field",
"required": true