-
I was trying to add widgets dynamically to an existing container. Widgets seems to be added at the bottom of screen each time. Basically each widget is taking a height of the screen from what i understood . This must be something trivial , but i couldnt figure out the issue. Can someone point out what is my mistake here. Thanks
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's going to depend on how you size As an example, if I take your code and add this to the styles: ItemsView {
height: 1fr;
} Then each |
Beta Was this translation helpful? Give feedback.
It's going to depend on how you size
ItemsView
. By defaultWidget
has no specified height and so, I believe, it'll use up the whole of the container. YourItemsView
is inheriting fromWidget
. You don't show what's in your stylesheet but if you've not given a height forItemsView
you're seeing what I'd expect you to see.As an example, if I take your code and add this to the styles:
Then each
ItemsView
added ends up taking up an equal share of the vertical space.