hi i had problem when include [footerHeight]="50", it shows that error
EXCEPTION: Uncaught (in promise): Error: Error in ./DataTableFooterComponent class DataTableFooterComponent - inline template:7:15 caused by: Cannot read property 'toLocaleString' of undefined
Error: Error in ./DataTableFooterComponent class DataTableFooterComponent - inline template:7:15 caused by: Cannot read property 'toLocaleString' of undefined
Please anyone help to solve this issue
Fixed in latest.
@amcdnl
It's not totally fixed.
If I use external pagination and don't initialize my paginator variables, it will crash before my data is loaded from server.
I think that the component should check if my data is undefined and avoid calling toLocaleString on a undefined variable.
<div class="page-count" *ngIf="!footerTemplate">
<span *ngIf="selectedMessage"> <!-- Shouldn't it check here of selectedCount exists? -->
{{selectedCount.toLocaleString()}} {{selectedMessage}} /
</span>
{{rowCount.toLocaleString()}} {{totalMessage}}
</div>
I have solved this problem for myself initializing rowCount in the component's constructor:


@OraCool thank you my man!
@miloskovacevic can you copy your code and how you do it
@hilame yup , here


Most helpful comment
@amcdnl
It's not totally fixed.
If I use external pagination and don't initialize my paginator variables, it will crash before my data is loaded from server.
I think that the component should check if my data is undefined and avoid calling
toLocaleStringon a undefined variable.