Skip to content

Conversation

crisbeto
Copy link
Member

The CDK tree was calling ChangeDetectorRef.detectChanges recursively for each node in the tree which was overflowing the call stack with some larger trees.

These changes resolve the issue by only calling detectChanges on the root.

Fixes #29733.

The CDK tree was calling `ChangeDetectorRef.detectChanges` recursively for each node in the tree which was overflowing the call stack with some larger trees.

These changes resolve the issue by only calling `detectChanges` on the root.

Fixes angular#29733.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Sep 18, 2024
@crisbeto crisbeto requested a review from a team as a code owner September 18, 2024 08:41
@crisbeto crisbeto requested review from andrewseguin and wagnermaciel and removed request for a team September 18, 2024 08:41
@crisbeto crisbeto removed the request for review from wagnermaciel September 18, 2024 16:41
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Sep 18, 2024
@crisbeto crisbeto merged commit be004b8 into angular:main Sep 18, 2024
22 of 25 checks passed
crisbeto added a commit that referenced this pull request Sep 18, 2024
The CDK tree was calling `ChangeDetectorRef.detectChanges` recursively for each node in the tree which was overflowing the call stack with some larger trees.

These changes resolve the issue by only calling `detectChanges` on the root.

Fixes #29733.

(cherry picked from commit be004b8)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cdk/tree): RangeError: Maximum call stack size exceeded

2 participants