primeng
primeng copied to clipboard
p-table: RowGroup not grouping on subsequent pages
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
- Lazy load data into a p-table component with a paginator
- Click on any page other than page 1
- Note that the grouping is no longer applied
- In Stackblitz repo, click page 2, rows no longer grouped:
Expected behavior
The unique rows should be grouped regardless of what page is currently being displayed in the table.