Browse Source

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

zhixin 10 years ago
parent
commit
f79a0e6f01
1 changed files with 8 additions and 0 deletions
  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) {
     BootstrapTable.prototype.load = function(data) {
         _load.apply(this, Array.prototype.slice.apply(arguments));
         _load.apply(this, Array.prototype.slice.apply(arguments));
 
 
+        if (!this.options.advancedSearch) {
+            return;
+        }
+
         if (typeof this.options.idTable === 'undefined') {
         if (typeof this.options.idTable === 'undefined') {
             return;
             return;
         } else {
         } else {
@@ -195,6 +199,10 @@
     BootstrapTable.prototype.initSearch = function () {
     BootstrapTable.prototype.initSearch = function () {
         _initSearch.apply(this, Array.prototype.slice.apply(arguments));
         _initSearch.apply(this, Array.prototype.slice.apply(arguments));
 
 
+        if (!this.options.advancedSearch) {
+            return;
+        }
+
         var that = this;
         var that = this;
         var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
         var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;