Skip to main content
Question

Nested element cannot be resized

  • January 20, 2023
  • 6 replies
  • 2054 views

Adriano

I have a component that includes a list made with Autolayout.
I need some of those items to have different heights.
When I use the component in my design I cannot specify the size of the list items, they can only be Hug or Fill, and when I choose Fixed the size input field is greyed out.

If I choose Fill on the list items they will change their size based on the container, so I could resize them by adjusting the size of the parent. But that will make all of them the same height. I need them to be in different sizes.

How can I make each list item in a different size?

6 replies

Gleb
  • Power Member
  • 4706 replies
  • January 20, 2023

You can’t modify the size of items inside a component instance. So a solution would be to not use a component instance here.


Adriano
  • Author
  • 10 replies
  • January 20, 2023

I see.

It would be fantastic to be able to override the element size when inside another component.

I’m designing a table, and I have components for each Column. I have different Cell Components I can switch to change content. And sometimes the content of the cell is big enough that they become higher, so I will have to change other cells which might not have the same content so I can’t use Hug in there, I have to use an arbitrary height.


tank666
  • 4863 replies
  • January 20, 2023

So you’ve taken the wrong approach. Instead of a column component, you need a row component.


Adriano
  • Author
  • 10 replies
  • January 22, 2023

I think the problem is that I have “an accordion inside an accordion”. So regardless of how the table is composed, I won’t be able to resize a component nested inside another.

I wish there was a way to assign an arbitrary size for elements inside a component.


  • 6 replies
  • May 10, 2024

This is still an issue… (Especially necessary for table components, either if you use row or column components)


Dustin_Hansen2

It is very odd. You can switch from Fixed to Hug or Fill. But you can’t modify the fixed size. It doesn’t make sense to me.


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