primefaces / primefaces/primereact
DataTable: VirtualScroller does not work 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
In DataTable, when using VirtualScroller and RowGroup, the grouped item is messing up its sticky position (it seems to be conflicting the "group header" with items ).
The buggy effect can be seen after scrolling above the second group onwards. Then, the header keeps popping in the screen and messing up even with the items rows spacing/height.
Reproducer
https://codesandbox.io/s/primereact-demo-forked-iid9th?file=/src/demo.js:2552-2816
PrimeReact version
9.2.1
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
- Scroll the table items below the second row group.
- See the strange behavior (row group header position, spacing/height problems, multiple groups elements in DOM, etc).
Expected behavior
It was expected VirtualScroller to ignore row group header/footer items, so everything could work as it does without the virtual scrolling functionality (which is something really needed in some scenarios, where a big list can't be nicely rendered without stucking the application).
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 CodeSandbox reproducer and inspect the DataTable integration of VirtualScroller with RowGroup. Reproduce the behavior by scrolling below the second group, then trace the group header and item rows involved. Done means grouped headers retain correct sticky positions and row spacing without duplicate group elements in the DOM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100