primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-table: RowGroup not grouping on subsequent pages

Open psarno opened this issue 2 years ago • 2 comments

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:

image

Page 2:

image

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

  1. Lazy load data into a p-table component with a paginator
  2. Click on any page other than page 1
  3. Note that the grouping is no longer applied
  4. In Stackblitz repo, click page 2, rows no longer grouped:

image

Expected behavior

The unique rows should be grouped regardless of what page is currently being displayed in the table.

psarno avatar Nov 10 '22 17:11 psarno