1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-04-25 15:28:41 +02:00

fix(UI): table rows lose internal id after an update

This commit is contained in:
Fabio Di Stasio 2021-03-09 18:07:48 +01:00
parent ddfb713124
commit 76c5c0c680

View File

@ -289,14 +289,15 @@ export default {
this.resizeResults(); this.resizeResults();
}, },
updateField (payload, row) { updateField (payload, row) {
delete row._id; const localRow = Object.assign({}, row);
delete localRow._id;
const params = { const params = {
primary: this.primaryField.name, primary: this.primaryField.name,
schema: this.getSchema(this.resultsetIndex), schema: this.getSchema(this.resultsetIndex),
table: this.getTable(this.resultsetIndex), table: this.getTable(this.resultsetIndex),
id: this.getPrimaryValue(row), id: this.getPrimaryValue(localRow),
row, localRow,
...payload ...payload
}; };
this.$emit('update-field', params); this.$emit('update-field', params);