primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.82k stars 1.04k forks source link

DataTable: VirtualScroller does not work with grouping #4167

Open luanmm opened 1 year ago

luanmm commented 1 year ago

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

  1. Scroll the table items below the second row group.
  2. 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).

yabelozub commented 1 month ago

Has anyone found a workaround to solve this problem?