Accordions issue with empty space when push/pull other accordions

Hi, I have a problem with accordions. What I am trying to achieve is when I click on one of the accordions while another is open. Then the first one will open, the second one will hide. Sometimes they work as I wanted sometimes they leave the white space behind. I have no clue why?
Here is the file: accordion_issue.rp (429.0 KB)

Hey @Kamil Its easier to use the repeater function to create a accordion. Here is the file I updated. Please let me know if you have any questions.

Steps I have used to create it:-
Add a repeater
Go in to the repeater add your rows and the data, update the text of the rectangle to the column0 value
While in the repeater Add a dynamic panel and make it hidden
Add onclick action to repeater title to toggle the dynamic panel
Set the selected style for your titles and on click set the selected state of the title to toggle

Thats it, now you can create unlimited accordions, just increase the number of rows in the repeater and your done!

accordion_issue_fixed.rp (442.1 KB)

1 Like

Hi @Axurefan!
Thank you for helping me with this issue. It is a nice alternative for what I did. However, I was looking for one more thing. When I click on one of the accordions and then I want to click another one I want to toggle back the first one I clicked so I will have only one accordion open at a time. I am wondering how to apply this to your solution?

If I can ask, how do you recommend to learn advanced parts of Axure to speed up my work and make my prototypes more advanced?

Nice :sunglasses:
Really smart way to do it :grin:

Hi @Kamil,

Here:
Accordeon.rp (58.8 KB)
(Make sure you don’t delete the hidden button, it’s useful for the interaction.
I let fire event outside the repeater, so all items will be update)

The idea:
Create your repeater
OnClick on item: 1- Fire interaction on a button outside so all panel are hidden ; 2-Show panel inside the panel
image

image

Hope it will help you,

PS:

You could look at the support of Axure:

And, for me, the best would be to search through threads in the forum.

thank you for your time and the solution! this on is tricky too :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.