ソースを参照

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

option)
Dustin Utecht 6 年 前
コミット
a8477795df

+ 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)
   }