浏览代码

fix(js): fix #1983, cookie with pageNumber and searchText bug

zhixin 7 年之前
父节点
当前提交
75d008c2aa
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/bootstrap-table.js

+ 3 - 1
src/bootstrap-table.js

@@ -1237,7 +1237,9 @@
       this.searchText = text
       this.options.searchText = text
 
-      this.options.pageNumber = 1
+      if (!firedByInitSearchText) {
+        this.options.pageNumber = 1
+      }
       this.initSearch()
       if (firedByInitSearchText) {
         if (this.options.sidePagination === 'client') {