Commit d0ed7f94 authored by 好多大米's avatar 好多大米 Committed by GitHub

Table: fix toggleAllSelection bug when table is empty (#21456)

parent d6dedac2
......@@ -32,7 +32,7 @@ export const cellForced = {
return <el-checkbox
disabled={ store.states.data && store.states.data.length === 0 }
indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
nativeOn-click={ this.toggleAllSelection }
on-input={ this.toggleAllSelection }
value={ this.isAllSelected } />;
},
renderCell: function(h, { row, column, store, $index }) {
......
......@@ -291,8 +291,7 @@ export default {
return classes.join(' ');
},
toggleAllSelection(event) {
event.stopPropagation();
toggleAllSelection() {
this.store.commit('toggleAllSelection');
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment