[Datagrid]: useNestedRow initialState
should look for id specified in data
before using row.id
from react-table
#5263
Labels
component: Datagrid
Sev 3
Visible or noticeable to users but does not impede functionality. Has a workaround.
type: bug 🐛
Something isn't working
Package
Carbon for IBM Products
Description
The current behavior of
initialState.expandedRowIds
is to use the row id's given to each row byreact-table
. The problem this presents is that consumers don't have any clue what id each row is being given. We should instead look for/use the id provided in the original data and use theid
fromreact-table
as a fallback.Component(s) impacted
Datagrid,
useNestedRows
initial expansion stateBrowser
Chrome
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
2.38.0
Severity
Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.
Product/offering
IBM Cloud Projects
CodeSandbox or Stackblitz example
https://stackblitz.com/github/carbon-design-system/ibm-products/tree/main/examples/carbon-for-ibm-products/Datagrid?file=src%2FExample%2FExample.jsx
Steps to reproduce the issue (if applicable)
No response
Release date (if applicable)
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: