浏览代码

Merge pull request #1636 from GabrielUlici/develop

#1619 Fixed sub-table checkbox selects all the table
文翼 10 年之前
父节点
当前提交
e886c15c1a
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/bootstrap-table.js

+ 1 - 2
src/bootstrap-table.js

@@ -790,8 +790,7 @@
         }
 
         this.$selectAll = this.$header.find('[name="btSelectAll"]');
-        this.$container.off('click', '[name="btSelectAll"]')
-            .on('click', '[name="btSelectAll"]', function () {
+        this.$selectAll.off('click').on('click', function () {
                 var checked = $(this).prop('checked');
                 that[checked ? 'checkAll' : 'uncheckAll']();
                 that.updateSelected();