primefaces / primefaces/primereact
DataTable: row group doesn't allow to group different values
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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