Browse Source

Fix but: Support search without data-field set.

zhixin 11 years ago
parent
commit
f561b775cf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bootstrap-table.js

+ 2 - 2
src/bootstrap-table.js

@@ -577,8 +577,8 @@
             var s = this.searchText && this.searchText.toLowerCase();
 
             this.data = s ? $.grep(this.options.data, function (item) {
-            key = $.isNumeric(key) ? parseInt(key): key ;
-            for (var key in item) {
+                key = $.isNumeric(key) ? parseInt(key, 10) : key;
+                for (var key in item) {
                     if ($.inArray(key, that.header.fields) !== -1 &&
                         (typeof item[key] === 'string' ||
                         typeof item[key] === 'number') &&