fix: table infinite update #2270

pull/2284/head
tanjinzhou 5 years ago
parent 1e86019ceb
commit 0d7900e305

@ -416,7 +416,9 @@ export default {
data = data.slice(0);
const sorterFn = this.getSorterFn(currentState);
if (sorterFn) {
data = this.recursiveSort(data, sorterFn);
// 使
// https://github.com/vueComponent/ant-design-vue/issues/2270
data = this.recursiveSort([...data], sorterFn);
}
//
if (filter && filters) {
@ -885,7 +887,7 @@ export default {
item[childrenColumnName]
? {
...item,
[childrenColumnName]: this.recursiveSort(item[childrenColumnName], sorterFn),
[childrenColumnName]: this.recursiveSort([...item[childrenColumnName]], sorterFn),
}
: item,
);

Loading…
Cancel
Save