Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
IgbCombo - Error when datasource changes
posted

I have an IgbCombo where the Data property is being set to list of objects.  When a user selects something on the screen that underlying list gets filtered down.  When this happens instead of the combo updating to have the filtered list of data it is throwing javascript errors like below:

<IgbCombo Data="@facilities"
DisplayKey="@nameof(FacilityComboSelection.FacilityName)"
@bind-Value="@selectedFac"
Change="FacilityChange" />

<IgbButton @onclick="Click">Clickme</IgbButton>

@code {
private IList<FacilityComboSelection> facilities;

protected override async Task OnInitializedAsync()
{
facilities = (await _userAccessService.GetFacilities()).ToList();
}

private void Click()
{
facilities = facilities.Take(2).ToList();
}

Parents Reply Children
No Data