Explorar o código

Table: add indeterminate state to multiple selection header checkbox (#9363)

* Table: Add indeterminate and disabled state to multiple selection header checkbox

* Remove disabled state handling of select-all checkbox
syn-zeta %!s(int64=7) %!d(string=hai) anos
pai
achega
ca02cb9cd3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/table/src/table-column.js

+ 2 - 1
packages/table/src/table-column.js

@@ -32,8 +32,9 @@ const defaults = {
 
 const forced = {
   selection: {
-    renderHeader: function(h) {
+    renderHeader: function(h, { store }) {
       return <el-checkbox
+        indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
         nativeOn-click={ this.toggleAllSelection }
         value={ this.isAllSelected } />;
     },