Fix switching types

This commit is contained in:
Adria Navarro 2024-04-17 16:13:46 +02:00
parent b3ff97df7b
commit f7a1b4cb12
1 changed files with 4 additions and 4 deletions

View File

@ -170,7 +170,7 @@
$: typeEnabled = $: typeEnabled =
!originalName || !originalName ||
(originalName && (originalName &&
SWITCHABLE_TYPES[editableColumn.type] && SWITCHABLE_TYPES[field.type] &&
!editableColumn?.autocolumn) !editableColumn?.autocolumn)
const fieldDefinitions = Object.values(FIELDS).reduce( const fieldDefinitions = Object.values(FIELDS).reduce(
@ -363,9 +363,9 @@
function getAllowedTypes() { function getAllowedTypes() {
if (originalName) { if (originalName) {
return ( return (SWITCHABLE_TYPES[field.type] || [editableColumn.type]).map(
SWITCHABLE_TYPES[editableColumn.type] || [editableColumn.type] f => FIELDS[f.toUpperCase()]
).map(f => FIELDS[f.toUpperCase()]) )
} }
const isUsers = const isUsers =