Completed
Last Updated: 12 Oct 2022 07:26 by ADMIN
Release 3.7.0 (09 Nov 2022)
JamesD
Created on: 06 Oct 2022 08:47
Category: DropDownList
Type: Bug Report
1
DropDownList throws on Enter and Up/Down when no data

The DropDownList triggers exceptions if there are no items in the dropdown and one tries to use keyboard navigation:

  • up/down arrows to change the selected item, no matter if the component is open or not
  • Enter after filtering for non-existent item

Here is a test page. A possible workaround is to set DefautText, so that the dropdown always contains at least one  item.

Open and press Enter, Up or Down:

<TelerikDropDownList Data="@( new List<string>() )"
                     @bind-Value="@SelectedValue"
                     TItem="string"
                     TValue="string"
                     Width="200px" />

<br /><br />

Open, filter by something non-existent and press Enter, Up or Down:

<TelerikDropDownList Data="@DropDownData"
                     @bind-Value="@SelectedValue"
                     TItem="string"
                     TValue="string"
                     Filterable="true"
                     Width="200px" />

@code {
    string SelectedValue { get; set; }

    List<string> DropDownData = new List<string>()
    {
        "foo",
        "bar",
        "baz"
    };
}

0 comments