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
  • 34810
    Offline posted

    Hello Douglas,

    I have been investigating into the behavior you are seeing, and I was able to reproduce an error by changing the data, but it is a different error and so I am curious if we are testing potentially in different environments. Would it be possible for you to please provide the following details about your environment?

    1. Are you using Blazor Web Assembly (WASM) or Server?

    2. What version of .NET are you targeting?

    3. What version of Ignite UI for Blazor are you targeting? My tests were made against the latest version at the time of writing this - 23.2.120.

Reply Children