toggleSelectAll method should only operate on filtered data

This commit is contained in:
llnewuser 2018-07-28 20:50:33 +08:00
parent d9cbf61e38
commit 19183ec23c

View file

@ -118,8 +118,8 @@
},
toggleSelectAll (status) {
const keys = status ?
this.data.filter(data => !data.disabled || this.checkedKeys.indexOf(data.key) > -1).map(data => data.key) :
this.data.filter(data => data.disabled && this.checkedKeys.indexOf(data.key) > -1).map(data => data.key);
this.filterData.filter(data => !data.disabled || this.checkedKeys.indexOf(data.key) > -1).map(data => data.key) :
this.filterData.filter(data => data.disabled && this.checkedKeys.indexOf(data.key) > -1).map(data => data.key);
this.$emit('on-checked-keys-change', keys);
},
handleQueryClear () {