Browse Source

Fix #3872: update customSearch call

zhixin 7 years ago
parent
commit
9ab7061f65
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/bootstrap-table.js

+ 1 - 5
src/bootstrap-table.js

@@ -1261,11 +1261,7 @@
     initSearch () {
       if (this.options.sidePagination !== 'server') {
         if (this.options.customSearch !== $.noop) {
-          if (typeof this.options.customSearch === 'string') {
-            window[this.options.customSearch].apply(this, [this.searchText])
-          } else {
-            this.options.customSearch.apply(this, [this.searchText])
-          }
+          Utils.calculateObjectValue(this.options, this.options.customSearch, [this.searchText])
           return
         }