Browse Source

fix #2439: Fix filterBy cannot filter array keys

zhixin 9 years ago
parent
commit
de867d379a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -1235,7 +1235,7 @@
             this.data = f ? $.grep(this.options.data, function (item, i) {
             this.data = f ? $.grep(this.options.data, function (item, i) {
                 for (var key in f) {
                 for (var key in f) {
                     if ($.isArray(f[key]) && $.inArray(item[key], f[key]) === -1 ||
                     if ($.isArray(f[key]) && $.inArray(item[key], f[key]) === -1 ||
-                            item[key] !== f[key]) {
+                            !$.isArray(f[key]) && item[key] !== f[key]) {
                         return false;
                         return false;
                     }
                     }
                 }
                 }