Browse Source

fix: reload view meta after column update

re #859

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/863/head
Pranav C 3 years ago
parent
commit
1dae605172
  1. 9
      packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue

9
packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue

@ -1130,6 +1130,10 @@ export default {
if (i > -1) { if (i > -1) {
this.$set(this.fieldsOrder, i, col) this.$set(this.fieldsOrder, i, col)
} }
const s = (this.sortList || []).find(s => s.field === oldCol)
if (s) {
this.$set(s, 'field', col)
}
} }
// load latest table meta // load latest table meta
@ -1196,10 +1200,13 @@ export default {
this.selectedExpandRowMeta = rowMeta this.selectedExpandRowMeta = rowMeta
}, },
async onNewColCreation(col, oldCol) { async onNewColCreation(col, oldCol) {
if (this.$refs.drawer) {
await this.$refs.drawer.loadViews()
this.$refs.drawer.onViewIdChange(this.selectedViewId)
}
await this.loadMeta(true, col, oldCol) await this.loadMeta(true, col, oldCol)
this.$nextTick(async() => { this.$nextTick(async() => {
await this.loadTableData() await this.loadTableData()
// this.mapFieldsAndShowFields();
}) })
}, },
onFileDrop(ev) { onFileDrop(ev) {

Loading…
Cancel
Save