File tree Expand file tree Collapse file tree
lib/dtable/src/plugins/checkable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,12 +116,12 @@ function isAllRowChecked(this: DTableCheckable): boolean {
116116 const checkedLength = this . getChecks ( ) . length ;
117117 const { canRowCheckable, allowCheckDisabled} = this . options ;
118118 if ( canRowCheckable ) {
119- return checkedLength == = this . layout ?. allRows . reduce ( ( length , row ) => {
119+ return checkedLength > = this . layout ?. allRows . reduce ( ( length , row ) => {
120120 const checkable = canRowCheckable ? canRowCheckable . call ( this , row . id ) : true ;
121121 return length + ( ( ! checkable || ( ! allowCheckDisabled && checkable === 'disabled' ) ) ? 0 : 1 ) ;
122122 } , 0 ) ;
123123 }
124- return checkedLength == = allRowLength ;
124+ return checkedLength > = allRowLength ;
125125}
126126
127127function getChecks ( this : DTableCheckable ) : string [ ] {
@@ -281,7 +281,7 @@ const checkablePlugin: DTablePlugin<DTableCheckableTypes> = {
281281 return ;
282282 }
283283 const $checkbox = $target . closest ( checkboxSelector ) ;
284- if ( $checkbox . closest ( '.disabled' ) . length && ! this . options . allowCheckDisabled ) {
284+ if ( $checkbox . closest ( '.disabled' ) . length ) {
285285 event . preventDefault ( ) ;
286286 return ;
287287 }
You can’t perform that action at this time.
0 commit comments