"Set variable" interactions not working with variants

I’ve been trying with no success to use “Set variable” interactions with variants. I have a simple chip component with Default, Hover, Active and Selected states.
When clicking it, i want to toggle the right chip visibility to “true”.

chip

Since the component have states, i want to toggle the layer visible with my “Mouse up” interaction in my Active state before selecting it.

The problem is that when setting the variant back to it’s default state, it seems that the interactions is not registered, wich makes no sense considering that all the other state transitions/interaction still works as expected.

Hi @Andre_Constancio

If i understand well you want your component, when selected, to go from
this state : image
to this one : image
but your component go directly to this one : image

If this is your issue, it’s not a bug it’s the default behavior
When the component is selected and received a “Mouse up” event it changes to its default states. But right after (less than an 1ms), the default state triggers the “While hovering” effect because you cursor is still above the component so it goes straight to its hover states

Let me know if i missed the point

Hey :wave:

I’m expecting this behaviour…

The ideia is to make a very realistic interaction with “mouse up/down” states (i’m using this prototype for usability testing)… Like a button, if i hold down the click, it should wait for me to release it to properly register my action, so if i hold the click down and release it outside the button, nothing happens.

image

The thing is, when setting “set variable” interactions in my variant, i need to change it to the desired state that I want the logic to happen, configure the logic, then switch back to its default state, so when i preview the prototype, it starts in the correct state.

But when interacting with the variant, reaching the state that should trigger my logic, nothing happens…

As a workaround i’ve managed to make it work as expected by “hardcoding” the toggle logic, basically making a new component from each of my variants (wich defies the purpose of having instances :sleepy:)

Select

Thanks for sharing :hand_with_index_finger_and_thumb_crossed: