Sort types
This commit is contained in:
parent
ae137ca677
commit
7c3c82013c
|
@ -363,9 +363,14 @@
|
||||||
|
|
||||||
function getAllowedTypes() {
|
function getAllowedTypes() {
|
||||||
if (originalName) {
|
if (originalName) {
|
||||||
return (SWITCHABLE_TYPES[field.type] || [editableColumn.type]).map(
|
const possibleTypes = (
|
||||||
f => FIELDS[f.toUpperCase()]
|
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 =
|
const isUsers =
|
||||||
|
|
Loading…
Reference in New Issue