Sitelet https://github.com/angular/components/pull/33670
Skip to content

fix(cdk/table): update rows when row definitions change - #33670

Merged
crisbeto merged 1 commit into
angular:mainfrom
soltonigiri:fix/20717-table-row-template
Sep 15, 2026
Merged

crisbeto merged 1 commit into
angular:mainfrom
soltonigiri:fix/20717-table-row-template

Conversation

@soltonigiri

Copy link
Copy Markdown
Contributor

Fixes #20717.

CdkTable can receive an identity change from its iterable differ while a custom trackBy keeps the same row identity. Previously, renderRows() only updated the row data context, so a changed when result left the old row template rendered.

This change records the row definition used by each embedded row view and replaces only a view whose definition changes. Rows whose definitions are unchanged keep their existing DOM nodes.

Tests:

  • pnpm -s bazel test --nocache_test_results //src/cdk/table:unit_tests_chromium
  • pnpm -s tslint
  • pnpm -s ng-dev format changed --check

@google-cla

google-cla Bot commented Aug 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 15, 2026
@crisbeto
crisbeto merged commit a3936ea into angular:main Sep 15, 2026
16 of 18 checks passed
@crisbeto

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto pushed a commit that referenced this pull request Sep 15, 2026
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 area: cdk/table 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-table): Row differ (trackBy) does not detect row template changes

2 participants