Browse Source

Added filter parameter of customSearch option (#4533)

文翼 6 years ago
parent
commit
f5a91ea292
2 changed files with 2 additions and 1 deletions
  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.
   * `data`: the table data.
   * `text`: the search text.
   * `text`: the search text.
+  * `filter`: the filter object from `filterBy` method (from 1.15.4).
 
 
   Example usage:
   Example usage:
 
 

+ 1 - 1
src/bootstrap-table.js

@@ -720,7 +720,7 @@ class BootstrapTable {
     if (this.options.sidePagination !== 'server') {
     if (this.options.sidePagination !== 'server') {
       if (this.options.customSearch) {
       if (this.options.customSearch) {
         this.data = Utils.calculateObjectValue(this.options, 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
         return
       }
       }