From 2bbbc0fc83495f7be3d27a72c5d5d203b8240336 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Wed, 27 Nov 2024 14:52:20 +0000 Subject: [PATCH 1/2] fix hidden pv toggle --- app/components/Block.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/Block.tsx b/app/components/Block.tsx index e667b61..642f53e 100644 --- a/app/components/Block.tsx +++ b/app/components/Block.tsx @@ -18,7 +18,7 @@ export default function Block({ string | number | undefined >(); const [showAdvanced, setShowAdvanced] = useState(false); - if (!pv.visible && !showHiddenBlocks && !instName) { + if (!pv.visible && !showHiddenBlocks) { return null; } if (pv.value != currentValue) { From 22c24f5010f53452b509ff2b36881b5d59b8ef1d Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Wed, 27 Nov 2024 15:44:06 +0000 Subject: [PATCH 2/2] make the test actually test something --- app/components/Block.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/Block.test.tsx b/app/components/Block.test.tsx index 5dd11b4..216530c 100644 --- a/app/components/Block.test.tsx +++ b/app/components/Block.test.tsx @@ -31,7 +31,7 @@ it("renders topbar unchanged", () => { it("renders nothing if pv is hidden", () => { const aBlock: IfcBlock = { pvaddress: "SOME:PV", visible: false }; const { container } = render( - , + , { container: tableBody, },