1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

Sort types

This commit is contained in:
Adria Navarro 2024-04-17 16:43:13 +02:00
parent ae137ca677
commit 7c3c82013c

View file

@ -363,9 +363,14 @@
function getAllowedTypes() {
if (originalName) {
return (SWITCHABLE_TYPES[field.type] || [editableColumn.type]).map(
f => FIELDS[f.toUpperCase()]
)
const possibleTypes = (
SWITCHABLE_TYPES[field.type] || [editableColumn.type]
).map(t => t.toLowerCase())
return Object.entries(FIELDS)
.filter(([fieldType]) =>
possibleTypes.includes(fieldType.toLowerCase())
)
.map(([_, fieldDefinition]) => fieldDefinition)
}
const isUsers =