Hi all,
I’m trying to prototype an interactive map+card list interface, where you can click on a map pin and have the corresponding card scroll to the top and visually change in some way to denote that it’s selected.
The cards in my list are all instances of the same component, and they have a “state” variant (default, selected) with a visual border change.
I’ve had no issue with creating the on-Click interaction to scroll the list to the corresponding card. What I’m stumped on is how to add the component state change to the on-Click trigger.
When I try to create a variable for the component variant, the on-Click action changes ALL instances of the component, not the specific one associated with the specific map pin.
Logically, I want it to be something like “onClick, set variable ‘state’ of target instance to ‘selected’”.