primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable - Row Grouping: Expandable row groups that are expanded by default cannot be collapsed

Open pre-rendered opened this issue 4 years ago • 0 comments

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support request

Codesandbox Case (Bug Reports) https://codesandbox.io/s/trusting-khayyam-2dr5z

Current behavior If all rows are set to be expanded by default, any group with more than one row in its group cannot be collapsed. The only grouped rows that can be collapsed are those with exactly 1 row in the group.

Expected behavior All expandable row groups, regardless of how many rows are in its group, should be collapsible. For what it's worth, this sandbox shows the expected behavior (expands all Pronom personnel groups by default, can collapse any of these groups); It uses version 4.2.2 of primereact, but downgrading is not an option for us: https://codesandbox.io/s/primereact-datatable-issue-vb256?file=/src/index.js

Minimal reproduction of the problem with instructions See codesandbox: https://codesandbox.io/s/trusting-khayyam-2dr5z Click on any arrow to collapse the group. Notice that the only group that can be collapsed is Elwin Sharvill's group, which only has one row.

  • React version: 17.0.1

  • PrimeReact version: 7.2.0

pre-rendered avatar Jan 21 '22 21:01 pre-rendered