Skip to main content
Question

Hug contents bug with component properties


Engebret

I have an auto layout (inside a component) set to hug contents, containing two items.Each of these items can be hidden with a boolean component property.

When hiding either one of them, the auto layout behaves as expected, adjusting its width to that of the remaining visible object, but when both are hidden - it reverts to the initial width, as if all content within it was visible.

As a temporary workaround I have included a 0px object as well in the autolayout, but this feels like exactly the kind of hack the new updates is trying to remove.

Any ideas?

This topic has been closed for comments

3 replies

Antoine
  • 144 replies
  • May 23, 2022

Yep, also noticed that here. It’s not a component properties specific bug but happens on any kind of component instance.
The 0-px hack is the way to go for now… But I consider this a bug.


luis.carmona

+1 I wish the whole thing collapsed when both elements are hidden using the boolean property


  • 0 replies
  • July 1, 2022

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


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