Browse Source

Merge pull request #6732 from wenzhixin/fix/6715

Fixed clear search bug when clicking clearSearch button
文翼 2 years ago
parent
commit
8eb2c231f2
2 changed files with 9 additions and 0 deletions
  1. 4 0
      CHANGELOG.md
  2. 5 0
      src/extensions/addrbar/bootstrap-table-addrbar.js

+ 4 - 0
CHANGELOG.md

@@ -7,6 +7,10 @@ ChangeLog
 
 
 - **New:** Added `sortBy` method.
 - **New:** Added `sortBy` method.
 
 
+#### Extensions
+
+- **Update(addrbar):** Fixed clear search bug when clicking clearSearch button.
+
 ### 1.21.4
 ### 1.21.4
 
 
 #### Core
 #### Core

+ 5 - 0
src/extensions/addrbar/bootstrap-table-addrbar.js

@@ -132,6 +132,11 @@ $.BootstrapTable = class extends $.BootstrapTable {
     super.init(...args)
     super.init(...args)
   }
   }
 
 
+  resetSearch (text) {
+    super.resetSearch(text)
+    this.options.searchText = text || ''
+  }
+
   /*
   /*
    * Priority order:
    * Priority order:
    * The value specified by the user has the highest priority.
    * The value specified by the user has the highest priority.