浏览代码

Fix #932: filterBy method doesn't work bug.

zhixin 10 年之前
父节点
当前提交
f79a0e6f01
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/extensions/toolbar/bootstrap-table-toolbar.js

+ 8 - 0
src/extensions/toolbar/bootstrap-table-toolbar.js

@@ -180,6 +180,10 @@
     BootstrapTable.prototype.load = function(data) {
         _load.apply(this, Array.prototype.slice.apply(arguments));
 
+        if (!this.options.advancedSearch) {
+            return;
+        }
+
         if (typeof this.options.idTable === 'undefined') {
             return;
         } else {
@@ -195,6 +199,10 @@
     BootstrapTable.prototype.initSearch = function () {
         _initSearch.apply(this, Array.prototype.slice.apply(arguments));
 
+        if (!this.options.advancedSearch) {
+            return;
+        }
+
         var that = this;
         var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;