carbon-design-system / carbon-for-ibm-dotcom

Carbon for IBM.com is based on the Carbon Design System for IBM
https://www.ibm.com/standards/carbon/
Apache License 2.0
269 stars 156 forks source link

[data table inside selectable data table]: data table inside selectable data table is selectable #12015

Open DoofisS opened 1 month ago

DoofisS commented 1 month ago

Description

when you have expandable and selectable data table and you want to have a data table in expanded row inner dt will automatically be selectable idk if this is the default behavior if yes then how can we disable it cause what if I don't need inner dt to be selectable and I also don't really see adding hide-checkbox prop for every line as a good solution cause it still produce bugs then even when hidden

here some examples and a video of how it works

if you are pressing row checkbox it will not select checkboxes on dt that is inside the expandable row image but if you will press select all it will select even the checkboxes inside the expandable row image if we try to hide checkbox on a dt that is inside the expandable row cause we don't need it and then we press select all it still will check the checkboxes of the inner dt even the checkboxes are hidden image image

https://github.com/user-attachments/assets/924221aa-f561-495f-a50e-7a8635584012

Component(s) impacted

data table, expandable, selectable

Browser

No response

Carbon for IBM.com version

@carbon/web-components 2.12.0

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.

Application/website

Any project with dt

Package

@carbon/web-components

CodeSandbox example

https://codesandbox.io/p/sandbox/5mnty4?file=%2Findex.html

Steps to reproduce the issue (if applicable)

https://codesandbox.io/p/sandbox/5mnty4?file=%2Findex.html

Release date (if applicable)

No response

Code of Conduct

gyalogmixi commented 2 weeks ago

I do have a similar case, but there is a workaround. Here is a CodeSandbox example