We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0244d21 commit 0dbea62Copy full SHA for 0dbea62
components/table/demo/edit-row.md
@@ -106,11 +106,17 @@ Table with editable rows.
106
},
107
save(key) {
108
const newData = [...this.data];
109
+ const newCacheData = [...this.cacheData];
110
const target = newData.filter(item => key === item.key)[0];
- if (target) {
111
+ const targetCache = newCacheData.filter(item => key === item.key)[0];
112
+ if (target && targetCache) {
113
delete target.editable;
114
this.data = newData;
- this.cacheData = newData.map(item => ({ ...item }));
115
+ Object.assign(
116
+ targetCache,
117
+ target
118
+ );
119
+ this.cacheData = newCacheData;
120
}
121
122
cancel(key) {
0 commit comments