Forum Academy Marketplace Showcase Pricing Features

Can I set the state of many elements with one action?

Hi there!

I’m trying to set the state of many elements with just one action rather than setting each elements state individually with separate actions. Can someone please advise?

For context, what I’m trying to achieve is as follows:
When a user clicks on an icon it sets the colour of that icon to green and sets the colour of all other icons to grey.

Cheers

Your icon click could set 1 state to a value (ex: “ABC”) and then all the other icons could have a color condition on them to change to grey when the value is ABC. That way you don’t need to mess with a bunch of separate states. Multiple elements just react to a single state.

2 Likes

Thanks @romanmg! That’s working like a charm :smile: you’ve saved me a lot of time.

1 Like

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