Type FieldTypeToComponentMap
This commit is contained in:
parent
edd3ce8f0f
commit
f771cc17a7
|
@ -1,3 +1,5 @@
|
|||
import { FieldType } from "@budibase/types"
|
||||
|
||||
export const convertOldFieldFormat = fields => {
|
||||
if (!fields) {
|
||||
return []
|
||||
|
@ -31,17 +33,17 @@ export const getComponentForField = (field, schema) => {
|
|||
}
|
||||
|
||||
export const FieldTypeToComponentMap = {
|
||||
string: "stringfield",
|
||||
number: "numberfield",
|
||||
bigint: "bigintfield",
|
||||
options: "optionsfield",
|
||||
array: "multifieldselect",
|
||||
boolean: "booleanfield",
|
||||
longform: "longformfield",
|
||||
datetime: "datetimefield",
|
||||
attachment: "attachmentfield",
|
||||
link: "relationshipfield",
|
||||
json: "jsonfield",
|
||||
barcodeqr: "codescanner",
|
||||
bb_reference: "bbreferencefield",
|
||||
[FieldType.STRING]: "stringfield",
|
||||
[FieldType.NUMBER]: "numberfield",
|
||||
[FieldType.BIGINT]: "bigintfield",
|
||||
[FieldType.OPTIONS]: "optionsfield",
|
||||
[FieldType.ARRAY]: "multifieldselect",
|
||||
[FieldType.BOOLEAN]: "booleanfield",
|
||||
[FieldType.LONGFORM]: "longformfield",
|
||||
[FieldType.DATETIME]: "datetimefield",
|
||||
[FieldType.ATTACHMENT]: "attachmentfield",
|
||||
[FieldType.LINK]: "relationshipfield",
|
||||
[FieldType.JSON]: "jsonfield",
|
||||
[FieldType.BARCODEQR]: "codescanner",
|
||||
[FieldType.BB_REFERENCE]: "bbreferencefield",
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue