From 620d59ce3e6a1161641256d48b9b9e56dfc27a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pal=CC=8Co?= Date: Mon, 5 Oct 2026 21:19:03 +0200 Subject: [PATCH] Disable ref lookup when References column is hidden setShowBOMColumn compared the column name against "references" but the column is named "References", so hiding it never disabled and cleared the ref lookup box. An active lookup kept filtering the BOM by a column that was no longer visible. Also apply the disabled state on page load when References is hidden from a previous session. Co-Authored-By: Claude Opus 5.5 --- InteractiveHtmlBom/web/ibom.js | 2 +- InteractiveHtmlBom/web/util.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index 9173095e..d88a6f86 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -77,7 +77,7 @@ function setDarkMode(value) { } function setShowBOMColumn(field, value) { - if (field === "references") { + if (field === "References") { var rl = document.getElementById("reflookup"); rl.disabled = !value; if (!value) { diff --git a/InteractiveHtmlBom/web/util.js b/InteractiveHtmlBom/web/util.js index e3f4947c..a8ab365a 100644 --- a/InteractiveHtmlBom/web/util.js +++ b/InteractiveHtmlBom/web/util.js @@ -590,6 +590,7 @@ function initDefaults() { hcols = []; } settings.hiddenColumns = hcols.filter(e => fields.includes(e)); + document.getElementById("reflookup").disabled = settings.hiddenColumns.includes("References"); var cord = JSON.parse(readStorage("columnOrder")); if (cord === null) {