BlazorFluentUI icon indicating copy to clipboard operation
BlazorFluentUI copied to clipboard

Dropdown popup list not shown in correct position when >18 Options added

Open gallwood opened this issue 4 years ago • 0 comments

If you have a Dropdown component with more than 18 DropdownOption items in, the popup window is not placed in the correct position.

Using BlazorServer, and package version 5.5.3

@page "/dropdownissue"

<Stack>
    <Dropdown Label="My Dropdown"
          ItemsSource=@items
          DropdownHeight="300"
          @bind-SelectedOption=@selectedItem
          Style="width:300px"/>
</Stack>
@code {
    List<IDropdownOption>? items;
    IDropdownOption? selectedItem;

    protected override void OnInitialized()
    {
        items = new List<IDropdownOption>();
        for (int i = 0; i < 19; i++)
        {
            items.Add(new DropdownOption { Key = i.ToString(), Text = i.ToString() });
        };
        selectedItem = items.First(i => i.Key == "1");
        base.OnInitialized();
    }
}

gallwood avatar Jul 23 '21 07:07 gallwood