7.1.1 `RadzenDropDown.Value` No Longer Works, Manual Assignment Required
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):
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):
However, when doing this the drop down is never selected but rather always shows the Placeholder:
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);
}
To Reproduce
- Use the
RadzenDropDownin7.0.8with theValueassigned, observe selected value - Upgrade to
7.1.1and observe theValueresults in a compilation error (i.e. a breaking change 💥). Additionally, assigning this (orSelectedItem) to the object instance does not work, always resulting in thePlaceholder. - Manual assignment in
OnAfterRenderAsyncis 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. 🙏✨