Completed
Last Updated: 29 Apr 2022 09:55 by ADMIN
Release 3.3.0
Doug
Created on: 27 Oct 2021 22:36
Category: DropDownList
Type: Bug Report
4
DropDownList should clear selection when bind value is set to null (or the default) and no default value is set

The following knowledge base article describes how to select the default value in a drop down, but if there's no default value the selection is not cleared using this method.

https://docs.telerik.com/blazor-ui/knowledge-base/inputs-clear-selection-value?_ga=2.18517947.380379649.1635269411-1661447875.1621547203

When setting the bind value to null (or the default, or frankly anything that doesn't exist in the drop down) I'd like the drop down list selection to be cleared when there's no default value set on the DropDownList.

 

@page "/"

<br />

<TelerikButton OnClick="@ClearSelection">Clear selection</TelerikButton>
<TelerikDropDownList Data="@data" @bind-Value="selectedValue" />

@code {
    List<string> data = new() { "selection" };
    string selectedValue;

    void ClearSelection()
    {
        // This does not cause the drop down to clear the selection and I think it should.
        selectedValue = null;
    }
}

1 comment
ADMIN
Hristian Stefanov
Posted on: 01 Nov 2021 10:39

Hi Doug,

I'm changing the type of this public item to a "Bug Report" and marking it as "Unplanned".

You can continue tracking the status of the bug report here.

Regards,
Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.