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