mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 14:46:39 +00:00
fix: multiple after-update webhooks being triggered
Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
@@ -1079,7 +1079,7 @@ export default {
|
||||
// onCellValueChange(col, row, column) {
|
||||
// this.onCellValueChangeFn(col, row, column)
|
||||
// },
|
||||
async onCellValueChange(col, row, column) {
|
||||
async onCellValueChange(col, row, column, saved = false) {
|
||||
if (!this.data[row]) {
|
||||
return
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ export default {
|
||||
return
|
||||
}
|
||||
// return if there is no change
|
||||
if (oldRow[column._cn] === rowObj[column._cn]) {
|
||||
if (oldRow[column._cn] === rowObj[column._cn] && !saved) {
|
||||
return
|
||||
}
|
||||
const id = this.meta.columns.filter(c => c.pk).map(c => rowObj[c._cn]).join('___')
|
||||
@@ -1109,7 +1109,7 @@ export default {
|
||||
// eslint-disable-next-line promise/param-names
|
||||
const newData = await this.api.update(id, {
|
||||
[column._cn]: rowObj[column._cn]
|
||||
}, { [column._cn]: oldRow[column._cn] })
|
||||
}, { [column._cn]: oldRow[column._cn] }, saved)
|
||||
this.$set(this.data[row], 'row', { ...rowObj, ...newData })
|
||||
|
||||
this.$set(oldRow, column._cn, rowObj[column._cn])
|
||||
@@ -1178,7 +1178,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$set(this.data[index].row, col._cn, null)
|
||||
await this.onCellValueChange(colIndex, index, col)
|
||||
await this.onCellValueChange(colIndex, index, col, true)
|
||||
},
|
||||
async insertNewRow(atEnd = false, expand = false, presetValues = {}) {
|
||||
const isKanban = this.selectedView && this.selectedView.show_as === 'kanban'
|
||||
|
||||
Reference in New Issue
Block a user