Skip to main content
Question

While pressing a button component -state doesn’t reset after overlay is closed

  • July 7, 2023
  • 1 reply
  • 524 views

Michele_A

anyone could help me with this?

This topic has been closed for replies.

1 reply

  • 1 reply
  • July 25, 2024

Sure.
Instead of creating an interaction inside the component, you need to create a variable.
For example: I’ve created a string variable with the name: Status and the value: Resting, then I’ve applied this variable to the component from the prototype settings, selecting the trigger “while pressing” and the action “set variable” > onPress, from the variables previously set.
Then I created a second interaction, a double action: one to change the state and the other to open the overlay and voila!