Browse Source

fix(nc-gui): incorrect index to splice in deleteTableColumn

pull/4181/head
Wing-Kam Wong 2 years ago
parent
commit
f48faa7771
  1. 3
      packages/nc-gui/components/template/Editor.vue

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

@ -219,7 +219,8 @@ function deleteTable(tableIdx: number) {
data.tables.splice(tableIdx, 1)
}
function deleteTableColumn(tableIdx: number, columnIdx: number) {
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)
}

Loading…
Cancel
Save