bug(mat-sort-header): performance & change detection issue with the whole table #19441
Closed
Description
Reproduction
With Stackblitz I can't reproduce it as dev tools is not working there.
Steps to reproduce:
- Go to official Material page (https://material.angular.io/components/table/overview#sorting)
- Press F12
- Enable Paint flashing tool
- See that if you hover mat-sort-header (not clicking it, just hover), the whole table will be rendered again and again for nothing (even if you leave the sort header).
Expected Behavior
If I have a complex page with Material table, I would not expect performance issues because of re-rendering the whole table on hovering mat-sort-header. Table's data definetely should not connect to mat-sort-header on hover event by default.
Actual Behavior
Causes performance issues.
https://ibb.co/XXjZw1r
Environment
- Angular: 9 latest
- CDK/Material: 9 latest
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Activity