ソースを参照

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;