Latest version of Angular 2 and PrimeNG.
If I add a template to
I can confirm this behaviour.
This seems to be a bug in v1.1.2, to solve it I had to revert to v1.0.1.
Confirm. It's not working in v1.1.2. Critical issue.
Good to know. I will revert to 1.0.1. Hopefully this is resolved soon.
I have the same issue. Possibly fix for breaking unexpected change made in latest Angular 2 update broke this one. #1652
I've fixed it in my project with custom rowTrackBy
rowTrackBy(index: number, row: any) {
return row.id;
}
Just mapped it to corresponded property of p-dataTable
[rowTrackBy]="rowTrackBy"
@NikitaForm Instead of row.id I've used property in my row object that didn't triger template refresh when expected, and it seems to work. Thanks
If this didn't work I'd use this one: How to programmaticaly trigger refresh primeNG datatable when a button is clicked
Hm, It took me half a day before I realized that this error causing, that not refreshing the table :)
Angular 2.4.1 and PrimeNG 1.1.2
Templated columns do not refresh contents when paging or sorting, as mentioned by the original issue creator. Is there an ETA for this to get resolved?
Thank you.
my workaround is using rowIndex and access the correct object via your data array, however, this has another issue... when go to the last page (usually not a full page), then come back to previous page, the rowIndex becomes a very large number... I found that by using rowIndex = rowIndex % pagesize, I can get the correct rowIndex.
This is just an ugly workaround, hope the issue can be fixed soon.
I can replicate the issue with PrimeNG 1.1.2 release as well.There is no issue with 1.1.1.Anybody can confirm on this.
I have replicated the issue in ^1.1.2. Any templated column does not refresh when sorting.
Fixed via #1711, by the way PrimeNG 1.1.3 is released having the fix.