primefaces / primefaces/primereact

DataTable: row group doesn't allow to group different values

Open
#6,655 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The group by feature doesn't allow us to group different values, for example we want to group empty string ("") and undefined values on the same group. To do it, we need a callback that allow us to customize the groups in order to group that values on the same group.

Reproducer

https://stackblitz.com/edit/hiwhaw

PrimeReact version

10.6.5

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

In the reproducer, there are 2 groups with the same empty header (one row in each)

Expected behavior

For example, allow to group by !value || value === "" to have one group with an empty header (in the reproducer, 2 rows in a unique group with empty header)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproducer and the DataTable row-grouping entry point. Confirm how empty strings and undefined values currently create separate groups, then verify that a customization callback can place them in one group with the expected empty header.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.