radzen-blazor icon indicating copy to clipboard operation
radzen-blazor copied to clipboard

7.1.1 `RadzenDropDown.Value` No Longer Works, Manual Assignment Required

Open Mike-E-angelo opened this issue 10 months ago • 0 comments

Describe the bug Hello, after upgrading from 7.0.8 to 7.1.1 I have a problem with the RadenDropDown control. It appears the Value property changed from object to T which is a breaking change (the version should be 8.x due to this, but this is another matter altogether 😅).

This is what worked before (notice the error now under Value assignment in 7.1.1):

Image

So now I replace Value with the item reference, and for good measure the SelectedItem as well (using one or the other between the two did not work, either):

Image

However, when doing this the drop down is never selected but rather always shows the Placeholder:

Image

I have to manually assign the selected item via SelectItem in OnAfterRenderAsync for it to display as expected:

protected override Task OnAfterRenderAsync(bool firstRender)
    {
        if (firstRender)
        {
            return _selection.SelectItem(_selected, false);
        }
        return base.OnAfterRenderAsync(firstRender);
    }

Image

To Reproduce

  1. Use the RadzenDropDown in 7.0.8 with the Value assigned, observe selected value
  2. Upgrade to 7.1.1 and observe the Value results in a compilation error (i.e. a breaking change 💥). Additionally, assigning this (or SelectedItem) to the object instance does not work, always resulting in the Placeholder.
  3. Manual assignment in OnAfterRenderAsync is now required.

Expected behavior Assigning value in 7.1.1 should work as it did in 7.0.8.

Screenshots Seen above. 😃👍

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 7.1.1

Additional context Thank you for all your excellent efforts and work over there. 🙏✨

Mike-E-angelo avatar Jun 21 '25 07:06 Mike-E-angelo