Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datagrid]: useNestedRow initialState should look for id specified in data before using row.id from react-table #5263

Open
2 tasks done
matthewgallo opened this issue May 17, 2024 · 0 comments · May be fixed by #5334
Open
2 tasks done
Assignees
Labels
component: Datagrid Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working

Comments

@matthewgallo
Copy link
Member

Package

Carbon for IBM Products

Description

The current behavior of initialState.expandedRowIds is to use the row id's given to each row by react-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 the id from react-table as a fallback.

Component(s) impacted

Datagrid, useNestedRows initial expansion state

Browser

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

@matthewgallo matthewgallo added status: needs triage 🕵️‍♀️ type: bug 🐛 Something isn't working component: Datagrid Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. and removed status: needs triage 🕵️‍♀️ labels May 17, 2024
@matthewgallo matthewgallo self-assigned this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Datagrid Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working
Projects
Status: Needs review 👋
Development

Successfully merging a pull request may close this issue.

1 participant