I have a dropdown configured as part of a foreach loop (so there will be a variable number of these configured). I have each one bound to an ObservableCollection which is a member of a dictionary. This part all works correctly, the collection in the dictionary is updated correctly.
The issue is that when I add an EventHandler to the collection, it is never fired. I've downloaded the source code for the drop down and added to my project to step into it, and I think the issue is that the DropDown creates a new collection and replaces the existing collection in my dictionary, thus removing the eventhandler (or bypassing it). I believe this happens on line 1137 of DropDownBase.cs.
This is how I've configured the DropDown:
<Radzen.Blazor.RadzenDropDown TValue="ObservableCollection<CategoryScore>"
@bind-Value=@(Scores[sport])
Data=@category.Scores
id=@sport.Id
AllowSelectAll="false"
Multiple="true"
Chips="true"
TextProperty="Name"
Change=@(scores => ScoreSelectionOnChange( scores, sport)) />
The scores object is configured as:
private readonly Dictionary<CategorySport, ObservableCollection<CategoryScore>> Scores = [];
Is there any way to work around this issue?