*I'm submitting a bug report *
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-f1jpot-knw3nx
Current behavior
Clicking on sort of virtual scrollable table doesn't do anything
Expected behavior
Clicking on sort of virtual scrollable table should sort the table
Minimal reproduction of the problem with instructions
Angular version: 9.1.9
PrimeNG version: 9.1.0
Browser: [all]
Language: [all]
Angular version: 9.0.4
PrimeNG version: 9.1.0
Browser: only tried Chrome
same here!!
9.1.0 NOT WORKING: https://stackblitz.com/edit/primeng-tablevirtualscroll-demo-3pdmjy
9.0.6 WORKING: https://stackblitz.com/edit/primeng-tablevirtualscroll-demo-z319xk
As a workaround until this is fixed you can register a click listener on the th tag
<ng-template pTemplate="header">
<tr>
<th pSortableColumn="vin" (click)="refreshData()"> <-------------
vin <p-sortIcon field="vin"></p-sortIcon>
</th>
<th>
year
</th>
</tr>
</ng-template>
And in the refreshData method you assign a new reference to the value object
refreshData(): void {
this.cars = [...this.cars];
}
Thanks Ralscha, we used your workaround with success
Most helpful comment
As a workaround until this is fixed you can register a click listener on the th tag
And in the
refreshDatamethod you assign a new reference to the value object