From 8d1585d11b190d3f24796bbb617d9ad6fd05f4b7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 15 Nov 2024 16:06:23 +0100 Subject: [PATCH] Bug 38436: Restore hide columns when empty If a column has no data on the items table we should hide the column. --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index a8f3d7979f7..b669faa42e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -125,8 +125,8 @@ function update_columns_visibility(settings){ let table = settings.oInstance.api(); - table.columns().visible(true, false); - table.columns().every(function(i){ + table.columns().every(function(){ + let i = this.index(); let is_empty = true; let nodes = this.nodes(); nodes.each((td, ii) => { -- 2.34.1