carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://ibm-products.carbondesignsystem.com
Apache License 2.0
92 stars 136 forks source link

DataGrid select all doesn't work as expected #5898

Closed marinamas closed 1 week ago

marinamas commented 3 weeks ago

Package

Carbon for IBM Products

Description

https://github.com/user-attachments/assets/b13e32da-23d1-42ca-b15e-9070537070a8

Component(s) impacted

DataGrid batch action

Browser

Chrome, Safari, Firefox, Microsoft Edge

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

"@carbon/ibm-products": "2.46.0",

Suggested 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

NA

CodeSandbox or Stackblitz example

https://codesandbox.io/p/sandbox/datagrid-tooltip-hover-issue-26hqww?file=%2Fsrc%2FExample.js%3A203%2C25

Steps to reproduce the issue (if applicable)

No response

Release date (if applicable)

No response

Code of Conduct

elycheea commented 3 weeks ago

Thanks @marinamas for bringing this issue to office hours.

The intended design is that the checkbox in the column header should select the current page only. This can be replicated in both in the CodeSandbox provided and the Storybook (increase rows + add pagination).

Marina’s examples show that the initial selection selects all items across all pages instead of just the current page.

marinamas commented 3 weeks ago

image

The use of useSelectAllWithToggle , doesn't display the tooltip properly

elycheea commented 2 weeks ago

@marinamas This is an older version of the select all and no longer recommended — our design has moved towards using the select all button in the batch actions toolbar.

devadula-nandan commented 1 week ago

Hi @marinamas, could you elaborate the specific use case, you were talking about in the office hours? just to re validate it in my pr.

marinamas commented 1 week ago

@devadula-nandan , when using DatagridBatchActions component there is no option to select across pages