Browse Source

Update checkBy/uncheckBy methods.

zhixin 10 years ago
parent
commit
1b7c1e672a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/bootstrap-table.js

+ 3 - 3
src/bootstrap-table.js

@@ -1559,11 +1559,11 @@
         }
         
         var that = this;
-        $.each(this.data, function (index, row) {
-            if(!row.hasOwnProperty(obj.field)) {
+        $.each(this.options.data, function (index, row) {
+            if (!row.hasOwnProperty(obj.field)) {
                 return false;
             }
-            if($.inArray(row[obj.field], obj.values) != -1) {
+            if ($.inArray(row[obj.field], obj.values) !== -1) {
                 that.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
                 row[that.header.stateField] = checked;
                 that.trigger(checked ? 'check' : 'uncheck', row);