浏览代码

Fixed all checkbox not auto check after pagination changed (#5926)

文翼 4 年之前
父节点
当前提交
d8c0d3879d
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/bootstrap-table.js

+ 1 - 4
src/bootstrap-table.js

@@ -1761,9 +1761,9 @@ class BootstrapTable {
     }
 
     this.initBodyEvent()
-    this.updateSelected()
     this.initFooter()
     this.resetView()
+    this.updateSelected()
 
     if (this.options.sidePagination !== 'server') {
       this.options.totalRows = data.length
@@ -2998,9 +2998,6 @@ class BootstrapTable {
       this.options.height = params.height
     }
 
-    this.$selectAll.prop('checked', this.$selectItem.length > 0 &&
-      this.$selectItem.length === this.$selectItem.filter(':checked').length)
-
     this.$tableContainer.toggleClass('has-card-view', this.options.cardView)
 
     if (!this.options.cardView && this.options.showHeader && this.options.height) {