Skip to main content

Prototype action: Set variable to default value

  • November 27, 2024
  • 0 replies
  • 13 views

ari3

Use case: I have a product card with a main image and a row of color swatches underneath it. Right now, clicking a swatch updates the product image to the correct color via setting a string variable (e.g. on click, set variable to “Product_Blue”). It also give the swatch a black stroke indicating it’s the selected color. So far so good.

I would like to add functionality where it updates the product image while hovering but then resets it when the mouse moves away. This is currently impossible, as the variable reassignment sticks.

This thread suggests using mouse enter/mouse exit, but this doesn’t work in my example because there are as many possible mouse exit variables as there are swatches (how would we know which swatch was selected before hovering over another?)

So, I’m proposing that there be a way to set the value of a set variable action to “default”, AKA whatever value is stored in your local variables.

Thanks 🙂

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings