[Silk UI Mobile] List of flip content limit only open one at a time

[Silk UI Mobile] List of flip content limit only open one at a time

  
Forge Component
(16)
Published on 19 Oct (4 days ago) by OutSystems R&D
16 votes
Published on 19 Oct (4 days ago) by OutSystems R&D

How to achieve that?

I have list of records which wrapped as flip content. I want only open 1 record of flip content at a time. When use click on second record, the first opened flip content should be closed.

I tried to create local variable to save state of flip content, I manage to store the last state of flip content but still how to prevent user clicking on second or third records? Or how to close the first opened flip content when user click on second or third records?


Many thanks

Hi Eric, 


You should add a new boolean parameter (I.e isFlipped) to the query/structure that is binded to the list, and assign it to each CardFlip item on the IsFlipped paramater. Something similar to the following:


Then, on the handler of the OnFlip event, you should iterate the list and assign that boolean value to false for each record except the one on the currentrownumber.


Let me know if it worked.


Cheers,