Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cdk/tree): resolve maximum call stack error #29754

Merged
merged 1 commit into from
Sep 18, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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