Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Trigger Accordion Collapse besides clicking on it?

Mayerkel priority asked 2 years ago


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?



We will discuss this thread. Any changes will be made in the next release. Currently, you cannot access toggleAccordion.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No