I have a list of single select components and a button on a screen. I want the button component to become activeonly if the one of the single select components is selected. If none are selected it should be disabled.
I have ‘active’ and ‘disabled’ as component properties on my button but I can’t figure out a way to control visbiltiy of the component properties - only visibility of the entire component. Is this possible?
Seems like a very obvious use case for conditional logic but I just can’t figure out how/if it’s possible.
Thanks!
Create a Variable [YourButtonStringVariableHere] set its name to “disabled”
(it will be the default state for your button)
On your select component :
OnClick setVariable [YourButtonStringVariableHere] to “active”
(This will change the state of your button to active when you click).
On your artboard link the button variant to [YourButtonStringVariableHere]
This is the simplest.
You could go down a different road in case you want to ensure the button becomes active if only one element is selected.
In that case you would have to do it with a number increasing depending on how many elements are selected and only trigger active button state if the number is one.
This is a bit long to explain here though.
Thanks so much - this did the trick