Skip to main content
iammai
June 22, 2023
Question

'Change to' with conditional action not working

  • June 22, 2023
  • 66 replies
  • 7357 views

When based on a conditional I want the component variant to change to another one (depending on the conditional), it doesn’t let me choose it to go to two different change-tos. If I change one of them, it changes the other one immediately.

I would upload image or video but I can’t as I am a new user. But basically to replicate this:

  1. Create 3 variants of a component (eg a number 1, 2, and 3 in a frame, and make them into component variants, let’s say the prop is either 1, 2, or 3)
  2. Create a variable (eg. next that is 3)
  3. From variant 2, create an on click interaction that has a conditional:

if (next == 3){
change to props = 3
}
else{
change to props = 1
}

What you will see is that when you create the second change to, it is automatically set to props = 3, and if you try to update the second one to props = 1, it will change the first one to props =1 as well.

This topic has been closed for replies.

66 replies

Ilona_Czerwinska
New Participant
June 22, 2023

Dear community,

I wanted to ask if anyone else is experiencing issues when trying to use the “change to” action with variant changes in Figma’s conditional interactions. The dropdown with variants displays correctly, but selecting a different variant than the currently chosen one doesn’t seem to have any effect. Additionally, I’m curious if you are able to see the options to apply variables to variant components because I can’t seem to find them.

Any insights or suggestions would be greatly appreciated. Thank you in advance!

Jared_Rauh
June 22, 2023

I’m experiencing a similar issue. When I set a “change to” action on click, things work well, but if I set the “change to” action within a conditional, the dropdown menu won’t allow me to select anything. I’m assuming this is a bug? Otherwise I’m not sure why I cannot select those variants.

Ilona_Czerwinska
New Participant
June 23, 2023

I reported the bug 🙂

Spas
June 23, 2023

Same issue here. At least I was able to make the interaction by dragging from the component / element handles directly and pointing to the variant.

Jared_Rauh
June 23, 2023

Yes, I can create the interaction by dragging. But cannot do so via the dropdown. Glad I’m not alone 🙂

Christian_Conte
June 23, 2023

I having similar issues.
I building a button, if Conditional-X is true the button “Changes to” Variant-A, if else “Changes to” Variant-B.

When I got just one conditional with an if state, the “Change to” works, but when I add an else to make the button go to Variant-B the conditional breaks.

The same happens if I use two conditionals only with an if on each
Ex:(if X is true = A else = empy / if X is false = B else = empy).

Looks that ween I add more than one “Change to”, they start to conflicting with each other.

Terry_Burris
June 27, 2023

I’m having similar issues as well. Seems to be a bug, as mentioned in previous comments. Thanks for reporting the issue by the way! Will help plenty of people soon 🙂
Has there been any updates since you reported it @Ilona_Czerwinska?

Terry_Burris
June 27, 2023

I found a work around just now. Did a couple of tests to make sure I was right about it before posting it on here, but the bug is mainly seen whenever you are UPDATING the conditional flow added to your variant. If you remove the conditional flow, and add it again, you will be able to select a different variant in your “change to” dropdown.

As for the “else” portion of the conditional flow, there is no work around yet. Seems that when you add a “change to” in the else, your if condition “change to” will be updated to be the same variant selected in your else condition. Definitely a bug 🙂

AndreiNistor
June 28, 2023

Frustrating, wasting hours to understand where is the error and why it’s not working, only to discover it’s actually a bug.

Ilona_Czerwinska
New Participant
June 29, 2023

@Terry_Burris nothing specific besides they are aware and they are investigating this problem. Here’s a piece of e’mail I received:

“It appears you have encountered a known issue with our conditional interactions that our engineers are currently investigating.
I’ll be keeping this ticket on hold as we investigate further and will let you know once we have any updates.
We apologize for the inconvenience and thank you for your patience as we work to resolve this.”