primefaces / primefaces/primereact
DataTable: Expander with grouping
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
I wanted to create table where there would be grouping by 2. Let's say if in case of working with months it would be like first 2 weeks and last two weeks. Inside those I wanted to be able to expande that row for first two weeks where I would have days or smetginh else. But... Since in this example below I have group of two and that td has rowspan of 2, as soon as I do the expand goes off becase rowspan stays the same and now we have 3 insted of 2 rows or maybe even 4 if we expand both first and second week. I've tried to manualy set number of rowspan for that column but it's not working as expected. Is there a solution or workaround?
Reproducer
https://codesandbox.io/s/primereact-demo-forked-fsljr7?file=/src/App.tsx
PrimeReact version
9.5.0
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
No response
Expected behavior
No response
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 by running the linked CodeSandbox reproducer with PrimeReact 9.5.0 and inspect the DataTable grouping and row-expansion configuration. Compare the rowspan behavior as grouped rows expand; the work is done when the interaction has a documented supported solution or workaround that preserves the grouped layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100