Skip to main content
Solved

Variable interaction bug - Prototyping

  • October 26, 2023
  • 1 reply
  • 323 views

Rav

Hi team,

I am experiencing an issue while prototyping a component. The variable I assigned to the click interaction does not change accordingly. I have provided a video below to demonstrate the issue.

I am hoping to get this issue fixed as soon as possible.

Thanks,

Rav

Best answer by dvaliao

Hey @Rav, thanks for reaching out and for providing the screen recording!

From what we can see on our end, the issue could be from a combination of things. It appears to be working as expected, but **when setting the variable to 1, you’ll want to also set a conditional to check if it’s checked or not. Then increase or decrease that count variable by +1 / -1. **

You’ve set an interaction on a instance state, and then changed to an alternate state expecting the interaction applied to persist, but that’s not how component set instances work for interactive components. Only overrides on the ‘active’ state can be applied. Your checkbox is also nested inside another instance which could be causing a problem.

View original

1 reply

dvaliao
Figmate
  • Community Support
  • 4591 replies
  • Answer
  • October 31, 2023

Hey @Rav, thanks for reaching out and for providing the screen recording!

From what we can see on our end, the issue could be from a combination of things. It appears to be working as expected, but **when setting the variable to 1, you’ll want to also set a conditional to check if it’s checked or not. Then increase or decrease that count variable by +1 / -1. **

You’ve set an interaction on a instance state, and then changed to an alternate state expecting the interaction applied to persist, but that’s not how component set instances work for interactive components. Only overrides on the ‘active’ state can be applied. Your checkbox is also nested inside another instance which could be causing a problem.


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