Browse Source

Fixed cookie search cannot work bug

zhixin 6 years ago
parent
commit
ac9bc50ab3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extensions/cookie/bootstrap-table-cookie.js

+ 1 - 1
src/extensions/cookie/bootstrap-table-cookie.js

@@ -329,7 +329,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
   onSearch (event) {
   onSearch (event) {
     super.onSearch(event)
     super.onSearch(event)
 
 
-    if ($(event.currentTarget).parent().hasClass('search')) {
+    if (this.options.search) {
       UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText)
       UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText)
     }
     }
     UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
     UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)