Open psarno opened 1 year ago
Any chance on getting a triage on this? The Stackblitz clearly shows the repro and this is causing us issues in production.
This still happens with the latest version, and just using the paginator with row grouping is enough for this problem to occur. I created a new Stackblitz with the latest version and a minimal example: https://stackblitz.com/edit/github-h9bjw4-vgqkeu
I think the bug is caused by this line https://github.com/primefaces/primeng/blob/1f6c5d95271e5b48aabdcd15bc040a1f3bea5adc/src/app/components/table/table.ts#L3220
Specifically the subtraction of this.dt._first
.
Describe the bug
We have a p-table component using
[lazy]="true"
and the following ng-templates:<ng-template pTemplate="groupheader" let-rowData let-rowIndex="rowIndex" let-expanded="expanded">
<ng-template pTemplate="rowexpansion" let-rowData let-columns="columns">
We also have the row toggle as
[pRowToggler]="rowData"
.On the first page, it correctly groups by the
groupheader
/pRowToggler
, but on all subsequent pages the grouping stops and each line is shown individually.Page 1:
Page 2:
Environment
Versions Below.
Reproducer
https://stackblitz.com/edit/github-sb1bvu
Angular version
14.2.9
PrimeNG version
14.2.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.13.1
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The unique rows should be grouped regardless of what page is currently being displayed in the table.