浏览代码

Update bootstrap-table.js

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

+ 2 - 1
src/bootstrap-table.js

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