SaveEdit is filtering by "id" is hard codded
agent3bood opened this issue · 1 comments
agent3bood commented
public saveEdit(): void {
this._postgrestService.doPatch(this.currentUrl + this.table + "?id=eq." + this.tableRowToEdit['id'], this.tableRowToEdit)
.catch(error => console.log(error))
.then(res => this.cancelEdit())
}
Also the delete function
public deleteRow(row: any) {
var t = this;
this._postgrestService.doDelete(this.currentUrl + this.table + "?id=eq." + row['id'])
.catch(error => console.log(error))
.then(v => t.refreshTable()
)
}
This function can be changed to filter the edit by the primary key of the table.
I can make a PR, just tell me if you can merge it?
agent3bood commented