From de519d81a4f067f1ea56dd6535252959d7e560aa Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 14 Jul 2023 22:09:02 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(AccordionComponent):=20remov?= =?UTF-8?q?e=20console.log=20statement=20for=20open=20variable=20?= =?UTF-8?q?=F0=9F=90=9B=20fix(ApiModal):=20set=20open=20accordion=20to=20e?= =?UTF-8?q?mpty=20array=20if=20there=20are=20no=20accordions=20to=20open?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/components/AccordionComponent/index.tsx | 3 +++ src/frontend/src/modals/ApiModal/index.tsx | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx index 3b0ddd596..d083bbaff 100644 --- a/src/frontend/src/components/AccordionComponent/index.tsx +++ b/src/frontend/src/components/AccordionComponent/index.tsx @@ -16,6 +16,9 @@ export default function AccordionComponent({ open.length === 0 ? "" : getOpenAccordion() ); + console.log(open); + + function getOpenAccordion() { let value = ""; open.forEach((el) => { diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx index fc85a6fb4..14eabd0bc 100644 --- a/src/frontend/src/modals/ApiModal/index.tsx +++ b/src/frontend/src/modals/ApiModal/index.tsx @@ -308,6 +308,11 @@ const ApiModal = forwardRef( } }); }); + + if(accordionsToOpen.length == 0){ + setOpenAccordion([]); + } + } const setOpen = (x: boolean) => {