浏览代码

fix issue with filtercontrol and cookie extension (revert commit and add (#4400)

option)
Dustin Utecht 6 年之前
父节点
当前提交
a8477795df
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      src/bootstrap-table.js
  2. 1 1
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 2 - 2
src/bootstrap-table.js

@@ -653,8 +653,8 @@ class BootstrapTable {
     }
   }
 
-  onSearch ({currentTarget, firedByInitSearchText} = {}) {
-    if (currentTarget !== undefined) {
+  onSearch ({currentTarget, firedByInitSearchText} = {}, overwriteSearchText = true) {
+    if (currentTarget !== undefined && overwriteSearchText) {
       const text = $(currentTarget).val().trim()
 
       if (this.options.trimOnSearch && $(currentTarget).val() !== text) {

+ 1 - 1
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -757,7 +757,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
     this.options.pageNumber = 1
     this.EnableControls(false)
-    this.onSearch()
+    this.onSearch(event, false)
     this.trigger('column-search', $field, text)
   }