Browse Source

Merge pull request #4181 from nocodb/fix/template-editor-delete

fix: template editor delete
pull/4192/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
288ebb43d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nc-gui/components/template/Editor.vue

5
packages/nc-gui/components/template/Editor.vue

@ -219,8 +219,9 @@ function deleteTable(tableIdx: number) {
data.tables.splice(tableIdx, 1)
}
function deleteTableColumn(tableIdx: number, columnIdx: number) {
data.tables[tableIdx].columns?.splice(columnIdx, 1)
function deleteTableColumn(tableIdx: number, columnKey: number) {
const columnIdx = data.tables[tableIdx].columns.findIndex((c: ColumnType & { key: number }) => c.key === columnKey)
data.tables[tableIdx].columns.splice(columnIdx, 1)
}
function addNewColumnRow(tableIdx: number, uidt: string) {

Loading…
Cancel
Save