Open
Description
Description
Call of dataAccessor
method is against Angular best practices and will be bad for performance in tables with large data sets.
<td mat-cell *matCellDef="let data" [style.text-align]="justify">
{{dataAccessor(data, name)}}
</td>
See line 30 inside MatTextColumn
for reference.
Reproduction
Expected Behavior
Set the data in a variable inside the component on initialization and bind that to the template instead.
Actual Behavior
It gets the data inside the template by calling the dataAccessor
method.
Environment
- Angular:
- CDK/Material: