Skip to content

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

Open
soltonigiri wants to merge 1 commit into
angular:mainfrom
soltonigiri:fix/20717-table-row-template
Open

fix(cdk/table): update rows when row definitions change#33670
soltonigiri wants to merge 1 commit into
angular:mainfrom
soltonigiri:fix/20717-table-row-template

Conversation

@soltonigiri

Copy link
Copy Markdown

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.

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

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

1 participant