Datagrid nested rows not picking up changes in expansion state #4335
Labels
component: Datagrid
stale 🍞
status: waiting for author 💬
status: won’t fix 🔚
This will not be worked on
version: 1
Carbon 10 / v1
version: 2
Carbon 11 / v2
What package(s) are you using?
Detailed description
We are using Datagrid with
useNestedRows
, and we want the nested rows to be expanded by default. We therefore provideexpandedRowIds
ininitialState
. However, the nested rows are not expanded even the row ids are included inexpandedRowIds
.It appears to us that
expandedRowIds
are only consumed initially (see this code). Any subsequent changes to it are not picked up byuseNestedRows
. However, like any typical application,expandedRowIds
is initially undefined/empty because it takes time to fetch data beforeexpandedRowIds
can be computed and provided to Datagrid. Therefore it is important thatuseNestedRows
can pick up changes inexpandedRowIds
.Steps to reproduce the issue
useNestedRows
expandedRowIds
ininitialState
The text was updated successfully, but these errors were encountered: