mirror of https://github.com/ElemeFE/element
Table: fix toggleAllSelection bug when table is empty (#21456)
parent
d6dedac2e2
commit
d0ed7f94d6
|
@ -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');
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue