I’m trying to set up a repeating group that uses custom states to select each individual cell but only one at a time. Currently, when you select the Selected Cell group within the repeating group, it changes red to show that cell has been selected. What I want is for only one cell to be selected at a time. I figure there must be a way to change the custom state value of all the other Selected Cell groups within the repeating group but I can’t seem to figure that out. Any help would be appreciated.
Then I created a new icon (just to keep things separated from @SerPounce suggestion’s). In that icon I created this workflow that sets the parent group to the state we just created.
Fair call. Rereading the OP it seems your approach solves the need since only one RG cell is to be selected.
Also, I totally agree that is best practice to keep all states at the page. However, in the interpretation where multiple cells can be selected, the custom state would need to be within a group within the RG.
Y’all are awesome. That’s just what I was looking for. I’d seen a couple of posts seeming to ask for the same thing but they never had any replies. @SerPounce@rico.trevisan
This is great @keith. Very simple solution and works perfectly. What would I do to de-select the group when I click it again?
@rico.trevisan As you say this can get kind of wonky with the draggable groups since the selected cell remains but the content moves. For my purposes now, it’s not an issue but for anyone else not using draggable groups, it wouldn’t be an issue at all.
Hey Max. Just null out the selected index value (if the clicked group’s index is the same as selected index). In Bubble we do this by setting its value to empty (you literally leave the field empty as shown below):
You’ll note that if you think about the logic of this, you’ll of course need two workflows – one to set the state and one null the state out when we need to. In Bubble this is like so - here’s what we want to do when Selected Index and Cell’s Index are different (this is what you’re already doing, basically):