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

[Bug]: Dynamically added rows to DataTable don't get checked by the header's 'check all' checkbox #17660

Closed
2 tasks done
dave-wood opened this issue Oct 7, 2024 · 1 comment

Comments

@dave-wood
Copy link

Package

@carbon/web-components

Browser

Firefox

Package version

v2.10.0

React version

No response

Description

If you dynamically add a new row to an existing DataTable, and then use the 'check all' checkbox in the header, any new rows are not selected, only the existing rows have the checkbox checked.
You can see this in the example given in the Storybook for DataTable--Dynamic--Default: https://web-components.carbondesignsystem.com/?path=/story/components-datatable-dynamic--default
Looks like the tableRows never gets updated when adding a new row

Reproduction/example

https://web-components.carbondesignsystem.com/?path=/story/components-datatable-dynamic--default

Steps to reproduce

Using the Storybook example, click the gear icon top right of the table, select Add Row. Then click on the checkbox in the table's header to the left of the first column heading. All rows will then be checked apart from the new row just added.
https://web-components.carbondesignsystem.com/?path=/story/components-datatable-dynamic--default

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@ariellalgilmore
Copy link
Member

closing this with PR: #17895

@github-project-automation github-project-automation bot moved this from 🚦 In Review to ✅ Done in Design System Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants