Browse Source

fix: handle consecutive updates of different rows

re #734

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/763/head
Pranav C 3 years ago
parent
commit
c385f847c8
  1. 2
      packages/nc-gui/components/project/spreadsheet/components/editableCell.vue
  2. 16
      packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue

2
packages/nc-gui/components/project/spreadsheet/components/editableCell.vue

@ -196,8 +196,8 @@ export default {
},
set(val) {
this.changed = true
if (val !== this.value) { this.syncDataDebounce(this) }
this.$emit('input', val)
this.syncDataDebounce(this)
}
},
parentListeners() {

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

@ -878,14 +878,14 @@ export default {
}
}
},
// todo: move debounce to cell since this will skip few update api call
onCellValueChangeDebounce: debounce(async function(col, row, column, self) {
await self.onCellValueChangeFn(col, row, column)
}, 100),
onCellValueChange(col, row, column) {
this.onCellValueChangeDebounce(col, row, column, this)
},
async onCellValueChangeFn(col, row, column) {
// // todo: move debounce to cell since this will skip few update api call
// onCellValueChangeDebounce: debounce(async function(col, row, column, self) {
// await self.onCellValueChangeFn(col, row, column)
// }, 100),
// onCellValueChange(col, row, column) {
// this.onCellValueChangeFn(col, row, column)
// },
async onCellValueChange(col, row, column) {
if (!this.data[row]) {
return
}

Loading…
Cancel
Save