From b6b733c282a636f7e79e0abdb4c5f04bb73fafd7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Oct 2024 14:31:01 +0200 Subject: [PATCH] Bug 36640: Fix logic in column numbering for filters I don't really understand why this was not required on bug 33484, but here this patch fixes a bug with the filters and the column visibility: Fix: select an option in a column filter then hide a column that is before. Signed-off-by: Jake Deery Signed-off-by: Lisette Scheer Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index c6ae1433dd..0bc13d8157 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -860,7 +860,8 @@ function _dt_add_delay_filters(table_dt, table_node) { table_dt.column(i).search(val, true, false).draw(); }, delay_ms); - $(table_node).find('thead tr:eq(1) th').each( function (i) { + $(table_node).find('thead tr:eq(1) th').each( function (visible_i) { + var i = table_dt.column.index('fromVisible', visible_i); $(this).find("input") .unbind() .bind("keyup change", function(){