How to style an active repeating group cell

I have a repeating group of articles. When a user clicks on one of the cells, I want to style that cell differently than the rest. I’ve been able to set up conditions to style it on hover, and I’ve been able to use a custom state called “active” and toggle it when the cell is clicked. But I can’t figure out how to “untoggle” it when the user clicks another cell. It just stays active.

Any suggestions?

Hi there, @sean13… try “tying” the custom state to the current cell’s index, and then you can highlight a particular row only when the custom state is set to that row’s index (which should take care of the “untoggle” situation). Does that make sense and do you think it would work for you?

Hope this helps.


Thanks for the reply. I think I understand what you’re saying. I’m having the same issue though. See below:

I changed the custom state from binary to a number:

I set the style condition to be when the cell is hovered or the active state is the current cell’s index:

I set a workflow to set the state of the current cell’s index to active:

Still sets multiple cells to active:

Any idea what I’m doing wrong?

I could be way off here, but try putting the custom state on the repeating group itself instead of on what I assume is a group within the repeating group.

Awesome - that was it. Thank you!

1 Like

One more question - If I have a link to that article from other group on the page, how would I go about setting the card matching that article within the repeating group to active using this approach?

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