I send a delete request to the server, if status code === 200, this object has been removed. So, how to remove this element from the array in Vue data on the browser?
I am trying to use array splice. It will replace the array and trigger an update:
kpi = { 'id': 1, 'name': 'kpi test'}this.kpis = this.kpis.filter(function (item) { return kpi.id != item.id; });
Không có nhận xét nào:
Đăng nhận xét