[Silk UI Framework] SectionExpandable state (open/closed)

[Silk UI Framework] SectionExpandable state (open/closed)

  
Forge Component
(45)
Published on 10 May by OutSystems Labs
45 votes
Published on 10 May by OutSystems Labs
We really need a way to "inspect" a SectionExpandable to see if it is open or closed.
I am hacking a work-around but it feels, well, like a hack.
A bit of js never hurt anyone...
I think as SilkUI will mature more and more native functions will become available to us.
Ah yes ... and for those that might not have seen my other related thread, here is the excellent work around from Braxton:

For each SectionExpandable widget, BIND the IsExpanded to a unique local variable.
This allows you to do two critial things:

1) "inspect" the state of the widget regardless if the widget was open/closed by the user or by me programmatically
2) "change state" of the widget by a) setting the local variable associated with each SectionExpandable wiget and then b) refreshing the widget. It works great - although I'd recommend setting the refresh animation to NONE as I saw strange behaviours with animations.

?Thanks all!

Bruce Buttles wrote:

Ah yes ... and for those that might not have seen my other related thread, here is the excellent work around from Braxton:

For each SectionExpandable widget, BIND the IsExpanded to a unique local variable.
This allows you to do two critial things:

1) "inspect" the state of the widget regardless if the widget was open/closed by the user or by me programmatically
2) "change state" of the widget by a) setting the local variable associated with each SectionExpandable wiget and then b) refreshing the widget. It works great - although I'd recommend setting the refresh animation to NONE as I saw strange behaviours with animations.

?Thanks all!

So to be clear you don't need a response to this thread you opened? If so, please consider updating that post. Thank you.

https://www.outsystems.com/forums/discussion/19079/accordionitem-open-close-state/


Correct - and yes I put this same update in the other thread so folks can see the solution.