Typings
This commit is contained in:
parent
eb748db3be
commit
85a9b9ab21
|
@ -66,7 +66,7 @@
|
|||
let jsonSchemaModal
|
||||
let allowedTypes = []
|
||||
let editableColumn = {
|
||||
type: "string",
|
||||
type: fieldDefinitions.STRING.type,
|
||||
constraints: fieldDefinitions.STRING.constraints,
|
||||
// Initial value for column name in other table for linked records
|
||||
fieldName: $tables.selected.name,
|
||||
|
|
|
@ -422,13 +422,11 @@ export function hasTypeChanged(table: Table, oldTable: Table | undefined) {
|
|||
if (!oldTable) {
|
||||
return false
|
||||
}
|
||||
let key: any
|
||||
let field: any
|
||||
for ([key, field] of Object.entries(oldTable.schema)) {
|
||||
const oldType = field.type
|
||||
for (let [key, field] of Object.entries(oldTable.schema)) {
|
||||
if (!table.schema[key]) {
|
||||
continue
|
||||
}
|
||||
const oldType = field.type
|
||||
const newType = table.schema[key].type
|
||||
if (oldType !== newType && !areSwitchableTypes(oldType, newType)) {
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue