Sort types
This commit is contained in:
parent
ae137ca677
commit
7c3c82013c
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue