Permalink
Browse files

fix: 数据为空时选中header的复选框

  • Loading branch information...
whizbz11 committed Nov 9, 2016
1 parent 4a4ed18 commit b03a69fc28a9e3bd1458adaa548e390d89c28c55
Showing with 289 additions and 282 deletions.
  1. +2 −2 dist/js/u-grid.js
  2. +4 −4 dist/js/u-grid.min.js
  3. +1 −0 js/gridCompCreateCal.js
  4. +282 −276 js/gridCompOperateRow.js
View
@@ -2399,6 +2399,7 @@
this.resetScrollLeft();
this.hideEditMenu();
this.resetLeftHeight();
+ this.isCheckedHeaderRow();
if (typeof this.options.afterCreate == 'function') {
this.options.afterCreate.call(this);
}
@@ -2959,13 +2960,12 @@
'use strict';
exports.__esModule = true;
-
/*
重新结算是否选中header第一行
*/
var isCheckedHeaderRow = function isCheckedHeaderRow() {
- if (this.selectRows.length == this.dataSourceObj.rows.length) {
+ if (this.selectRows.length !== 0 && this.selectRows.length == this.dataSourceObj.rows.length) {
//修改全选标记为false
$('#' + this.options.id + '_header_multi_input').addClass('is-checked');
} else {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -50,6 +50,7 @@ const afterGridDivsCreate = function(){
this.resetScrollLeft();
this.hideEditMenu();
this.resetLeftHeight();
+ this.isCheckedHeaderRow();
if(typeof this.options.afterCreate == 'function'){
this.options.afterCreate.call(this);
}
Oops, something went wrong.

0 comments on commit b03a69f

Please sign in to comment.