fix(tree): render deferred selection in zoneless apps#17449
fix(tree): render deferred selection in zoneless apps#17449viktorkombov wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes IgxTree checkbox rendering in zoneless Angular apps when selection is applied via the deferred forceSelect path (e.g., initial [selected] bindings and cascading updates after node removal).
Changes:
- Injects
ChangeDetectorRefinIgxTreeComponentand callsmarkForCheck()after deferred selection is applied. - Adds zoneless unit tests covering (1) initial selected node rendering and (2) cascading selection update after removing an unselected child node.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/igniteui-angular/tree/src/tree/tree.component.ts | Triggers change detection scheduling after applying deferred selection to keep checkbox UI in sync in zoneless apps. |
| projects/igniteui-angular/tree/src/tree/tree-selection.spec.ts | Adds zoneless regression tests for initial selection rendering and cascading selection after node deletion. |
|
The issue is fixed indeed. However, I see another issue. If you later show the second |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
projects/igniteui-angular/tree/src/tree/tree.component.ts:87
ChangeDetectorRefis injected as optional, but for a component it should always be available. Making it optional can silently disable the CD notification that this fix relies on, making future regressions harder to detect. Prefer a required injection here.
private cdr = inject(ChangeDetectorRef, { optional: true });
Closes #17444
Description
Fixes Tree checkbox states not updating after deferred selection changes in
zoneless applications.
Covers initial selection and cascading selection after removing a child node.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
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)