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
935
error thrown when dropdown source data is changed
posted

Using latest releases of Angular and Ignite UI (12.0.3):

I have a pair of Dropdowns using the igx-input-group model. One of them determines the filtered data set of the second. I am using the (onSelection) attribute to filter the second, but I am also getting an error NG0100: ExpressionChangedAfterItHasBeenCheckedError.

The functionality isn't broken, but it's throwing an error like it is. If I didn't have tech savvy users who will complain, I wouldn't bother asking how to fix it.

A previous question suggested using markForCheck on the igx-grid component. Is there something similar for this setup I should be using, either on the dropdown or the input-group? This is in a dialog modal, if that makes any difference.

Parents Reply
  • 740
    Offline posted in reply to Chris Sworen

    Hello Chris,

    Thank you for getting back to me!

    Following your description I have updated the provided sample so that:

    1. The data for both igxDropDown components is retrieved asynchronously (simulating fetching from a server)
    2. The data for the second igxDropDown component is filtered whenever the selectedItem of the first one changes
    3. Initially the first item of both igxDropDown components is selected

    As you can observe no exceptions are thrown when changing the selectedItem of both igxDropDown components. Please keep in mind that as I have already mentioned in my previous reply without being able to replicate the described issue and to debug it on my side it will be really difficult to provide you with solution. Having this in mind providing me with small isolated sample will be highly appreciated and extremely helpful.

    PS. You have mentioned that you have used [(ngModel)]. After further investigation I can verify that the igxDropDown component class doesn’t inheritance the ControlValueAccessor interface meaning that the ngModel directive cannot be used together with it.

    Looking forward to hearing from you.

    Best Regards,
    Martin Evtimov
    Associate Software Developer
    Infragistics, Inc.

Children