ソースを参照

Fixed cookie search cannot work bug

zhixin 6 年 前
コミット
ac9bc50ab3
1 ファイル変更1 行追加1 行削除
  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) {
     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.pageNumber, this.options.pageNumber)