Topic: Trigger Accordion Collapse besides clicking on it?
Hello, I was wondering if there is a way to make the Accordion collapse without having to click the Accordion button.
For example, let's say I want to delete an element from the Accordion. I can do that easily and set the state of the new list of Accordion Items. However, I would prefer to have the open item on the Accordion first collapse before the deletion.
I looked through the AccordionItem.tsx code, and I found the function called toggleAccordion
.
Is there way I can access this function? Or if there are any Accordion Item methods already in place that I can use such as toggle, show/hide, etc?
Wojciech Staniszewski staff answered 3 years ago
We will discuss this thread. Any changes will be made in the next release. Currently, you cannot access toggleAccordion
.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB React
- MDB Version: MDB5 3.0.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No