From ab57a11b127b16504791988f2036fa3fa6a4ae50 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 9 Mar 2026 14:09:09 +0100 Subject: [PATCH] Bug 41992: Do not restore pagination offset When "Save configuration state on page change" is enabled, the page number is kept in localStorage and restored. To prevent that we can set the attribute "start" of the state to 0. Test plan: Go on a page with several pages, go to another page than the first one Go the another view and get back Without this patch the last visited page was preserved when returning to the previous view With this patch applied the view now defaults to the first page Note that this does not affect shareable links. --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 7b6dde8a7c6..61653326613 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1245,6 +1245,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes = {}) { } state = _dt_force_visibility(table_settings, this.api(), state); + state.start = 0; return state; }; -- 2.43.0