Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: Subheader row group with sorting #6768

Open
BestMn opened this issue Jun 18, 2024 · 0 comments
Open

DataTable: Subheader row group with sorting #6768

BestMn opened this issue Jun 18, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@BestMn
Copy link

BestMn commented Jun 18, 2024

Describe the bug

Subheader row group works wrong when you apply grouping on DataTable wihout sorting, or with sorting by different field than group field. If rows with same values go exactly one after another before applying grouping, they they will be grouped together, but if they are separated by rows with different value, they will be grouped to different groups.

I took the grouping stackblitz example from the documentation and change sortField to "status" in it. As you can see, the group by name has split into several groups.

Без имени-3

Reproducer

https://stackblitz.com/edit/uqllcb-jazz5i?file=src%2FApp.jsx

PrimeReact version

latest

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Take DataTable without sorting, or with sorting by one field;
  2. Apply subheader row group to DataTable with another field;

Expected behavior

Rows are grouped with the groupRowsBy property regardless of sorting in the table

@BestMn BestMn added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant