浏览代码

Fix #3872: update customSearch call

zhixin 7 年之前
父节点
当前提交
9ab7061f65
共有 1 个文件被更改,包括 1 次插入5 次删除
  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
         }