-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Table] Rows are not provided correct $implicit with trackBy #7877
Comments
Wouldn't this be what you want?
|
I suppose using trackBy is intended to prevent recreating of components and should not stop change detection to happen. I updated stackblitz template to show that ngFor+trackBy updates correctly. |
Thanks for reporting this issue. The intention of It turns out that when Thanks again for the issue, this was a major one that I'm surprised got this far. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug:
MatTable doesn't refresh row columns if [trackBy] function used. For example if I replace rows array with a new one having the same ids, but completely different data MatTable won't update. I suspect the same applies to CdkTable.
It looks like it correctly updates table when removing / adding rows but it fails to trigger ChangeDetection on components if no rows added or removed
What is the expected behavior?
When used with trackBy function Table should trigger change detection on all existing rows, just like ngFor with trackBy do.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-tbrfqj?file=app%2Fapp.component.html
The text was updated successfully, but these errors were encountered: