1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00

Fix allowed types

This commit is contained in:
Adria Navarro 2024-04-26 09:58:41 +02:00
parent 3b34f3f5f8
commit 8314685033

View file

@ -63,7 +63,6 @@
let savingColumn
let deleteColName
let jsonSchemaModal
let allowedTypes = []
let editableColumn = {
type: FIELDS.STRING.type,
constraints: FIELDS.STRING.constraints,
@ -171,6 +170,11 @@
SWITCHABLE_TYPES[field.type] &&
!editableColumn?.autocolumn)
$: allowedTypes = getAllowedTypes(datasource).map(t => ({
fieldId: makeFieldId(t.type, t.subtype),
...t,
}))
const fieldDefinitions = Object.values(FIELDS).reduce(
// Storing the fields by complex field id
(acc, field) => ({
@ -225,11 +229,6 @@
editableColumn.subtype,
editableColumn.autocolumn
)
allowedTypes = getAllowedTypes(datasource).map(t => ({
fieldId: makeFieldId(t.type, t.subtype),
...t,
}))
}
}