Skip to main content
Question

How do I use a component as a background within Auto layout?

  • November 10, 2021
  • 2 replies
  • 1049 views

aamerrit

I have a number of components that use the same dropdown background, that I’d like to use as a nested component.

The problem is, I can not get the background component to resize based on the number of items in the menu.

For example, if I have 10 menu items, I want the background to resize based on the number of menu items visible. Autocomplete either treats the background as another object, putting it below all the menu items, or if I put it in a different group, it does not resize it.

The only way I have found to do this is to not use a nested background component, but rather a style. Which unfortunately only applies the drop shadow, not the border radius, border, or background. I know this background is going to change soon, so I’d rather built it with a nested component that I can change once than have to go into several dozen components in the future to change them all individually.

Any suggestions?

This topic has been closed for comments

2 replies

Stefan_Abrahamsen

Can you share a demo file?


  • 0 replies
  • December 26, 2021

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