From 8581d400bdd9f539756584c5711b134d25dbc0db Mon Sep 17 00:00:00 2001 From: Petar Jakovljevic Date: Sat, 23 Dec 2017 12:47:21 +0100 Subject: [PATCH] Fix for #3050, Set page number to 1 after filter, Set page number to 1 after search --- src/extensions/cookie/bootstrap-table-cookie.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/extensions/cookie/bootstrap-table-cookie.js b/src/extensions/cookie/bootstrap-table-cookie.js index 02a1bee916..44dfa11975 100644 --- a/src/extensions/cookie/bootstrap-table-cookie.js +++ b/src/extensions/cookie/bootstrap-table-cookie.js @@ -343,6 +343,7 @@ BootstrapTable.prototype.onPageListChange = function () { _onPageListChange.apply(this, Array.prototype.slice.apply(arguments)); setCookie(this, cookieIds.pageList, this.options.pageSize); + setCookie(this, cookieIds.pageNumber, this.options.pageNumber); return false; }; @@ -384,6 +385,7 @@ if ($(target[0].currentTarget).parent().hasClass('search')) { setCookie(this, cookieIds.searchText, this.searchText); } + setCookie(this, cookieIds.pageNumber, this.options.pageNumber); }; BootstrapTable.prototype.getCookies = function () {