Blazor Dropdown triggering SelectedItemChanged event multiple times

For some reason the RadzenDropdown triggers the SelectedItemChanged event multiple times causing the page to delay or time out. I've tried various things to stop this, but I'm stuck, any ideas would be appreciated.


** **

    protected void UserSelectedItemChanged(object obj)
    {
        if (obj == null) return;
        canEdit = true;
        MemberId = (int)((MemberList)obj).MemberId;
        donation.memberId = (int)((MemberList)obj).MemberId;
        SelectedMember = MemManager.GetMemberTableByMemberId(MemberId).Result;

        var memManagerGetDonationsResult = MemManager.GetDonations(new Query() { Filter = $@"i => i.memberId.Equals(@0)", FilterParameters = new object[] { MemberId } }).Result;
        getDonationsResult = memManagerGetDonationsResult.OrderByDescending(i => i.donationDate);
        return;

    }

Maybe you can use @bind-Value instead to bind to a property and use the property setter invoke your code.

1 Like