have accordion load with all sections closed at first?

edited March 25 in Ideas
Is it possible to have all sections of the accordion component load in the closed state?
4
4 votes

Under Consideration · Last Updated

Comments

  • edited March 2019
    We need this too.  
  • edited March 2019
    Thanks for sharing that idea! Unfortunately, it's not possible at the moment, so I logged an enhancement request.
  • edited March 2019
    In the interim, you could add a blank accordion section at the topmost portion, and render it away with something like Running User Profile Name = ASDF

    Currently the top most accordion is opened by default on pageload, so if that's rendered away it will appear as if the others are in a closed state. 
  • edited April 2019
    Erik - That approach didn't work because it simply won't render the first section when the page loads so the accordion builds as if the first item doesn't exist and the second accordion item loads as the first item and is open (at least that's what happened when I tried this).  This is a timing issue where you need to allow the component to render into the page and then un-render it.  

    I did build on this idea and get a reasonable workaround.  What I did was setup a UI only model with a checkbox field defaulted to true.  Leave the option to create a default row turned off.  Then you set the rendering logic on the first accordion item to not display if the value of this field is set to true.  Then add an event triggered sequence to fire on "Skuid Page: Rendered" and add a row to the UI only model.  This will hide the first item in the accordion and leave the rest closed.  
  • edited April 2019
    This worked out really well. Thanks John!
Sign In or Register to comment.