feat: Formula GQL support, replace column name with alias

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
This commit is contained in:
Pranav C
2021-08-05 18:18:33 +05:30
committed by Pranav C
parent 3527f218e7
commit dbd97542c0
8 changed files with 127 additions and 72 deletions

View File

@@ -803,9 +803,13 @@ export default {
}
const id = this.meta.columns.filter(c => c.pk).map(c => rowObj[c._cn]).join('___')
await this.api.update(id, {
const newData = await this.api.update(id, {
[column._cn]: rowObj[column._cn]
}, { [column._cn]: oldRow[column._cn] })
this.$set(this.data[row], 'row', { ...rowObj, ...newData })
this.$set(oldRow, column._cn, rowObj[column._cn])
this.$toast.success(`${rowObj[this.primaryValueColumn] ? `${rowObj[this.primaryValueColumn]}'s c` : 'C'}olumn '${column.cn}' updated successfully.`, {
position: 'bottom-center'