Merge pull request #9528 from Budibase/fix/qr-field-type-parsing
Parse field type configuration for invalid characters
This commit is contained in:
commit
368e97f124
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -3241,7 +3241,7 @@
|
|||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "field/barcode/qr",
|
||||
"type": "field/barcodeqr",
|
||||
"label": "Field",
|
||||
"key": "field",
|
||||
"required": true
|
||||
|
|
Loading…
Reference in New Issue