Skip to content

fix(tree): render deferred selection in zoneless apps#17449

Open
viktorkombov wants to merge 1 commit into
masterfrom
vkombov/fix-17444
Open

fix(tree): render deferred selection in zoneless apps#17449
viktorkombov wants to merge 1 commit into
masterfrom
vkombov/fix-17444

Conversation

@viktorkombov

Copy link
Copy Markdown
Contributor

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):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ChangeDetectorRef in IgxTreeComponent and calls markForCheck() 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.

Comment thread projects/igniteui-angular/tree/src/tree/tree-selection.spec.ts
@mddragnev mddragnev added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Jul 22, 2026
@mddragnev

Copy link
Copy Markdown
Member

The issue is fixed indeed. However, I see another issue. If you later show the second tree-item which was never selected, the state of the tree does not go to indeterminate. This is issue is not regarding the zoneless and it is reproducible in Zone based CD, so it should be logged separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tree tree-selection version: 22.1.x ✅ status: verified Applies to PRs that have passed manual verification zoneless

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Zoneless] Tree parent checkbox does not update after removing an unselected child

3 participants