fix: fleuent Select
🐛 Bug Report
In the documentation for the multiple select it has the below code, this has a containing div so that all the options show, change the height value and items start covering information in the page below. This feels like this shouldn't be necessary as you may not know until runtime how many items are in the list.
💻 Repro or Code Sample
<div style="display: block; height: 300px;">
<FluentSelect Items=@stringOptions2
TOption="Option<string>"
Multiple=true
OptionText="@(i => i.Text)"
OptionValue="@(i => i.Value)"
OptionSelected="@(i => i.Selected)"
OptionDisabled="@(i => int.Parse(i.Value!) > 6)"
@bind-SelectedOptions="@selectedStrings" />
</div>
🤔 Expected Behavior
This doesn't feel right that we have to know the height of the containing div before creating the select with multiple options? It should handle this itself within the css.
😯 Current Behavior
Without the parent div the multiple select box covers anything below.
You don't need to know the height in advance. How it is done here in the demo is just so things align better. What you can do to make sure everything displays correctly in your site is to use the Height parameter of the FluentSelect component itself. Then if the list is longer than what fits, a scroll bar will be shown:
Here I set the
Height parameter to 200px; and left everything else as-is.
P.S. with the <fluent-select> web component, the list is always expanded when multiple is set so this is also true for the Blazor component