🐛 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:
parent
f8de3a5265
commit
de519d81a4
2 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,9 @@ export default function AccordionComponent({
|
||||||
open.length === 0 ? "" : getOpenAccordion()
|
open.length === 0 ? "" : getOpenAccordion()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(open);
|
||||||
|
|
||||||
|
|
||||||
function getOpenAccordion() {
|
function getOpenAccordion() {
|
||||||
let value = "";
|
let value = "";
|
||||||
open.forEach((el) => {
|
open.forEach((el) => {
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,11 @@ const ApiModal = forwardRef(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(accordionsToOpen.length == 0){
|
||||||
|
setOpenAccordion([]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const setOpen = (x: boolean) => {
|
const setOpen = (x: boolean) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue