From a4d8f2c66c8d17eb2e82be7cd84d6c2db96f1fe8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Feb 2025 10:25:50 +0100 Subject: [PATCH] Bug 39080: Redraw the table after we added the column filters If a column contains a dropdown list (for libraries for instance), the width of the column will be modified, but DT won't redraw the table and the offset will be kept on horizontal scroll. Test plan: One example where this problem can be observed is the "holds to pull" table: "Title" is followed by "Libraries". Test without and with the patch, and confirm that the display/offset is fixed. --- 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 084cb8c82c8..10abaa94222 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1099,6 +1099,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes={}){ var table_dt = table.DataTable(); if ( add_filters ) { _dt_add_filters(this, table_dt, filters_options); + table_dt.draw(); } table_dt.on("column-visibility.dt", function(){ -- 2.34.1