Expand / collapse accordion list

Hello, how are you?

I have a problem, I have an accordion stripe and I need a button that expands all the accordions and then collects them.

I was able to do the functionality using the isOpen property, with a Boolean variable, but as I need an ajax refresh to update the accordions, the accordion freezes and makes it impossible to open and close manually.


If anyone can help, I appreciate it.

What component do you using?

This Accordion?

Another question, what kind app you are building? Web / Mobile / Reactive ? And version?

Nuno Miguel Verdasca wrote:


What component do you using?

This Accordion?

Another question, what kind app you are building? Web / Mobile / Reactive ? And version?

Hello Nuno Miguel Verdasca

Yes this accordion,
version 11.6.29
Traditional Web



Please, check this post and tell me if this helps you! If not, let me know to try help you.

Nuno Miguel Verdasca wrote:

Please, check this post and tell me if this helps you! If not, let me know to try help you.

I found it interesting, however, I would like a solution if possible without using Javascript.
Something I noticed was that ajax refresh freezes the accordion's behavior, if it doesn't freeze, i can use (isOpen) itself with a variable to expand and collapsed the accordions.


Ismael Britzke wrote:

Hello, how are you?

I have a problem, I have an accordion stripe and I need a button that expands all the accordions and then collects them.

I was able to do the functionality using the isOpen property, with a Boolean variable, but as I need an ajax refresh to update the accordions, the accordion freezes and makes it impossible to open and close manually.


If anyone can help, I appreciate it.

Hi Ismael

When you update the accordions you need to ajax refresh the accordion "father"


Regards,

Flávio

You have to create a boolean and you set to the accordionitems and in the link action you change the Boolean value when is click that worked for me