Nested Instance Variant Binding : now, string variables can be bound to a nested instance’s variant properties, rather than only parent instances. What is the use case for this? What it looks like in the video is what we’ve been able to do since variables dropped, attach a variable to the property of an instance.
Cool - thanks for the hint. I was expecting it to be implemented similar with other fields. About the color: I was also looking for the variable indicator on color input.
I ran into an issue with the Nested Instance Variant Binding
In the Switch component variables & conditionals are NOT assigned on the component’s variants, but on the noodles of the instance variants since instances of this switch comp are to be used to trigger different elements in different contexts.
E.g. a switch in a filter bar above a list shows/hides specific list items. Another switch triggers in a Profile page turns an option on/off.
The Issue
I assign a “Visible” var to the gray bar.
On click on the switch’s “Hover on” state the gray bar should disappear. So, on its MouseUp event I set the “Visible” var to ‘false’.
I click the switch, and lo and behold, the gray bar disappears. Success (for now)
Since the “Hover on” state should NOT be the default, I change the switch’s state back to its “On” state.
When hovering the switch it’ll logically change to its “Hover on” state. Clicking it I’d expect the gray bar to disappear, BUUUT… Nope… It completely ignores the set var command
In summary,
unless I clone the “switch combo” comp for each and every different context this var assigning to variant instances I completly pointless and defeats reusability aspect of comps+vars.
If I’m doing something wrong, please let me know, I’d be eternally grateful