Closed
Description
When using trackBy, CdkTree / MatTree does not update items which share the same identity (as returned by trackBy), but are actually different obejcts (with property changes).
This behavior differs from the behavior shown by ngFor in combination with trackBy.
Reproduction
StackBlitz: https://stackblitz.com/edit/angular-cfph4s
Steps to reproduce:
- Click the button
Expected Behavior
The tree gets updated as the list created by ngFor does.
Actual Behavior
The tree does not change, only the list generated by ngFor.
Environment
- Angular: 9.0.1
- CDK/Material: 9.1.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS