Skip to main content

Heyy,

 

I have a card component with an icon container that I would like to switch with an asset container.

 

The icon container is a component with hug attributes. It contain an icon inside with a height defined with variable and a lock on aspect ratio.

The asset container is a component with a width in hug and a height attribute defined with a variable. It contain an asset inside with a fill height and a hug width.

 

I would like to switch the icon container with an asset container in my card.

When I’m switching the instance, the sizes and height are broken. 

I would like the height of my component to have the default size of the swapped instance but it’s keeping the original component size.

 

To be honest I don’t understand the behaviour and don’t know if I need to built my component differently.

 

Thanks !

 

I added a video explaining the behaviour

 

 

 

Hi ​@Bruno_Mattelet1 

 

Thanks for reaching out and sharing that screen recording - it really helped me understand what you're experiencing. I tested this with a simplified sample, and the height with variables seems to change correctly (as shown in my video).
 

To troubleshoot further:

  1. Is this happening with just this specific instance, or does it occur with all instances when you swap with this asset container?

    • If it's limited to this specific instance, the issue might be with the instance itself. Please try using "Repair component connections" or "Repair variable connections" from the Actions menu (you can access this by pressing Command+K on Mac or Control+K on Windows).
  2. If the issue persists after repairing connections, try clearing your cache.

  3. If you're still experiencing the problem after these steps, please submit a formal bug report with detailed reproduction steps here: https://help.figma.com/hc/en-us/articles/360041468234-Submit-a-bug-report

Let me know how these steps work out for you!

 

Thanks,

Toku

 

 


Reply