[Bug]: Carbon for IBM Products: Datagrid - onRowClick results in toggleRow.toggleRowSelected is not a function error in console #6547
Labels
component: Datagrid
Sev 2
Aspects of design is broken and impedes users in a significant way, but has workaround.
type: bug 🐛
Something isn't working
Package
Carbon for IBM Products
Description
Because of the fix/workaround offered for the issue (Filtering and Search in Datagrid with nested rows is not working as expected #4652
), another issue has surfaced. Using both useOnRowClick and useNestedRows with the workaround provided for #4652
results in an error in the console for row clicks.
As shown in the video attached, the row click works properly on the first page, however when I move on to the second page and do the row click, an error is thrown in the console. After receiving the error, if I return to the previous page, the older selection remains but the new selection is gone.
Component(s) impacted
stackblitz
https://stackblitz.com/edit/github-uzudxy-md54df?file=src%2FApp.jsx,src%2FExample%2FExample.jsx,src%2FExample%2FDatagridPagination.jsx
Screenshot
Video
Screen Recording 2024-12-05 at 4.00.23 PM.zip
Browser
Firefox, Chrome, Safari
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
"@carbon/ibm-products": "^2.50.0"
Suggested Severity
Severity 1 = The design is broken in a critical way that blocks users from completing tasks or damages the brand. Affects major functionality, no workaround.
Product/offering
IBM Financial Transaction Manager(FTM)
CodeSandbox or Stackblitz example
https://stackblitz.com/edit/github-uzudxy-md54df?file=src%2FApp.jsx,src%2FExample%2FExample.jsx,src%2FExample%2FDatagridPagination.jsx
Steps to reproduce the issue (if applicable)
Release date (if applicable)
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: