浏览代码

Added filter parameter of customSearch option (#4533)

文翼 6 年之前
父节点
当前提交
f5a91ea292
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      site/docs/api/table-options.md
  2. 1 1
      src/bootstrap-table.js

+ 1 - 0
site/docs/api/table-options.md

@@ -963,6 +963,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
   * `data`: the table data.
   * `text`: the search text.
+  * `filter`: the filter object from `filterBy` method (from 1.15.4).
 
   Example usage:
 

+ 1 - 1
src/bootstrap-table.js

@@ -720,7 +720,7 @@ class BootstrapTable {
     if (this.options.sidePagination !== 'server') {
       if (this.options.customSearch) {
         this.data = Utils.calculateObjectValue(this.options, this.options.customSearch,
-          [this.options.data, this.searchText])
+          [this.options.data, this.searchText, this.filterColumns])
         return
       }