i have used 2 accordion.  1 is with 2 item and 2nd one is with 1 item. I want that the 2nd accordian collapsed if first one is opend vise versa. How to implement this?

Hi,

that is the normal behaviour of accordion as you can see on the espace attached.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi,

that is the normal behaviour of accordion as you can see on the espace attached.

Regards,

Marcelo

Hello Marcelo, i have an accordion with a list records and when i render the page, my accordion appear with all options openned. And doesn't collapse  when i open another item. What should i do?


Amanda Natallie wrote:

Marcelo Ferreira wrote:

Hi,

that is the normal behaviour of accordion as you can see on the espace attached.

Regards,

Marcelo

Hello Marcelo, i have an accordion with a list records and when i render the page, my accordion appear with all options openned. And doesn't collapse  when i open another item. What should i do?


Hi Amanda!

Is your AccordionItem inside the list marked as IsOpen = False? Have a look at the attached screenshot, and let me know if you need more help.


Chris Vorster wrote:

Amanda Natallie wrote:

Marcelo Ferreira wrote:

Hi,

that is the normal behaviour of accordion as you can see on the espace attached.

Regards,

Marcelo

Hello Marcelo, i have an accordion with a list records and when i render the page, my accordion appear with all options openned. And doesn't collapse  when i open another item. What should i do?


Hi Amanda!

Is your AccordionItem inside the list marked as IsOpen = False? Have a look at the attached screenshot, and let me know if you need more help.


Which is also the way to make the accordions do what you like: Make a boolean variable in your list for eacht item and put it in the IsOpen.


Hi Stefano!

Yup, your answer will do the trick! Though I've never needed that level of control... I think the default behavior of the widget will close the open item when a different one is clicked (only one item open at a time) if everything is set up right.