Toggle a RG showing a full list

How can I use a button to toggle a RG between ‘full list’ layout and ‘fixed number of cells’ layout?

Hi there, @jessefarquhar48… one way (the only way?) to do what you described is to have two repeating groups, and show/hide them appropriately as the button is clicked (with the button click likely setting a custom state and the visibility conditionals on the repeating groups tied to the custom state).

Hope this helps.

Best…
Mike

Ok, so i’ll make the button set the state of the RG to x then just tell the full list RG to only display when that group is in state x and and the opposite for the fixed cell RG. The only thing left that i am not sure about is how to i make the button toggle the set state between x and not x?

Here is an example with a custom state (number) that has a default value of 1. You would have two workflows that have conditionals at the event level to set the state to 2 when it is currently set to 1 and vice versa. Make sense?

1 Like

Update: Shortly after asking this question, the guy from Buildcamp made a video on this. His approach was better: RG show more (Flex) | Bubble.io Tutorial - YouTube

You said you wanted to toggle between two layouts when a button was clicked, not show more things when a button was clicked. If you had said something similar to the latter, I wouldn’t have suggested what I suggested. Oh, well, glad you got your solution.

Yeah i didn’t do it exactly the way he in the video has done it: he has the button keep adding +8, i just have it +20 (which is more than than enough for any content my RG would display). So the state is either showing 4 or showing 24. I only need one RG instead of two and nothing is being show/hide. I only posted this update for future bubble travellers. Thanks for your help bud.

This topic was automatically closed after 70 days. New replies are no longer allowed.