fix(combo): address NG0100 in zoneless apps - 21.2.x#17315
Open
ddaribo wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses NG0100: ExpressionChangedAfterItHasBeenCheckedError occurrences in IgxCombo / IgxSimpleCombo when running under Angular zoneless change detection, primarily triggered by virtual scrolling interactions.
Changes:
- Cache a stable
aria-activedescendantid inIgxComboDropDownComponentto avoidQueryList-drivenfocusedItemfluctuations during virtual scroll. - Stabilize combo item template-bound values by syncing selection/transition state once per CD cycle (
ngDoCheck) inIgxComboItemComponent. - Add zoneless-focused unit tests to reproduce/guard against the reported scrolling NG0100 regressions (issue #17310).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| projects/igniteui-angular/drop-down/src/drop-down/drop-down.base.ts | Adjusts activeDescendant typing to support null and (with suggested fix) ensures stable nullish semantics. |
| projects/igniteui-angular/combo/src/combo/combo.component.spec.ts | Adds zoneless test coverage to ensure virtual scroll + active-descendant scenarios no longer throw NG0100. |
| projects/igniteui-angular/combo/src/combo/combo-item.component.ts | Caches selection/transition values per CD cycle via ngDoCheck to stabilize template bindings. |
| projects/igniteui-angular/combo/src/combo/combo-dropdown.component.ts | Implements cached active-descendant id and updates it on focus/selection changes to avoid scroll-time NG0100. |
5bcbaa9 to
7b6b120
Compare
7b6b120 to
91ed5a8
Compare
MonikaKirkova
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17310
Description
Addresses the causes of NG0100 error in zoneless apps.
'attr.aria-activedescendant: As thefocusedItemis read from aQueryList, when a focused item scrolls out of the viewport, thechildrenQueryList no longer contains it andfocusedItemwould be null. TheIgxDropDownItemNavigationDirectiveactiveDescendantHostBinding reads the target's (dropdown)activeDescendantfield, which callsfocusedItem. With Angular's new zoneless run-time, on scroll the value gets updated between two diferent change detection passes, so the error is thrown.The fix caches the active desc. id in the combo-dropdown component.
combo item template bindings properties errors - Sync
_selectedand_disableTransitionsfrom thecomboApiservice once per CD cycle - in ngDoCheck.Motivation / Context
Prevent the NG0100 error.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Combo, Simple combo
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)