Skip to main content
Andrea_Monfrini
New Participant
Nov 29, 2023 10:11 AM UTC
Solved

Trouble setting a component that changes the state of its parent

I’m having trouble setting a component that changes the state of its parent.
I have done this flux:

  • Create component A with default and hover variant
  • Create component B with two variants (dropdown closed and open)
  • Add component A as a child of component B. Add an On click → Change to interaction to the instance of component A. The two variants of component B will show up as options under the variant drop-down; you can open the drop-down, but you cannot select any variant besides the one that is already selected

Is this a bug of Figma? Or is my fault?

This topic has been closed for replies.
djv
djvSolution
Community Support
Nov 29, 2023 11:43 PM UTC

Hey Andrea, thanks for reaching out!

It’s hard to be sure without seeing your file, but from what you’ve described, you might be better off using multiple action variables instead:

Figma Learn - Help Center

1 reply

djv
Figmate
djvSolution
Community Support
Nov 29, 2023 11:43 PM UTC

Hey Andrea, thanks for reaching out!

It’s hard to be sure without seeing your file, but from what you’ve described, you might be better off using multiple action variables instead:

Figma Learn - Help Center