🐛 fix(AccordionComponent): remove console.log statement for open variable

🐛 fix(ApiModal): set open accordion to empty array if there are no accordions to open
This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-14 22:09:02 -03:00
commit de519d81a4
2 changed files with 8 additions and 0 deletions

View file

@ -16,6 +16,9 @@ export default function AccordionComponent({
open.length === 0 ? "" : getOpenAccordion()
);
console.log(open);
function getOpenAccordion() {
let value = "";
open.forEach((el) => {

View file

@ -308,6 +308,11 @@ const ApiModal = forwardRef(
}
});
});
if(accordionsToOpen.length == 0){
setOpenAccordion([]);
}
}
const setOpen = (x: boolean) => {