Closed marwanhawari closed 7 months ago
Hey there! Thank you so much for creating this issue.
We introduced the Height
attribute on the Select and MultiSelect fields to give them the ability to scroll. Let us know if that fixes your issue! If it doesn't work for you, please feel free to reopen this issue!
Is your feature request related to a problem? Please describe. I have a select component where the number of input elements is dynamic. It can be as few as 2 or 3 elements or even a few dozen. The problem is that if I don't set a height on a select component and I have lots of elements to display, the selection starts in the middle of the list.
If I set a fixed height, this fixes my problem for big lists:
However, for short lists, I get a UI that is too big:
Describe the solution you'd like My ideal UI would be what
survey
does by default:For
huh
I would maybe imagine a.MaxHeight()
method so that the small list would still fit the contents, but the big list would be contained within the MaxHeight value.This would result in the desired UI state:
Describe alternatives you've considered Have the
.Height()
method shrink to fit the contents by default and add a parameter to.Height()
to allow users to make it a fixed height if they want.Additional context Here's how I'm currently using the Select component: