Container height based on number of items to display #447
Replies: 4 comments 2 replies
-
Hello, I have the same requirement: I'm thankful for any input if and how this can be achieved. |
Beta Was this translation helpful? Give feedback.
-
I have the same requirement as @ppayerl. I am building a chat and would like for my chat messages to show up nearest to the input first, then fill the screen. So if there are only a few messages, they will show up at the bottom of the screen, but if there are many messages, the chat window will be filled. There are two ways that this could be accomplished:
@petyosi - do you have any idea how this could be accomplished? |
Beta Was this translation helpful? Give feedback.
-
We also need this feature for our dropdown in our DS library. Currently, I'm using this workaround. |
Beta Was this translation helpful? Give feedback.
-
The shrinking is also the default behaviour from tanstack/virtual. Developer experience wise I'd also much prefer this. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a specific use case scenario.
I want to render a list that displays an X number of items.
That list should have a max height based on the max number of items to display.
If there are less items to display, the height should be the max of the number of items displayed.
Is there any way to do achieve this without specifying a fixed height?
So my list would expand to the maximum number of items I want to display at a time, say 10.
But if there are only 5 items, I want it to shink so it won't take up space.
I don't know if this is feasible or not.
I have tried multiple configurations and looked at examples and in my case I always have to specify a height.
Hope anyone can help, thanks!
Beta Was this translation helpful? Give feedback.
All reactions