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

Toggletip in Datagrid header doesn't work when using useSortableColumns #6044

Open
2 tasks done
molyholy opened this issue Sep 11, 2024 · 0 comments
Open
2 tasks done

Comments

@molyholy
Copy link

molyholy commented Sep 11, 2024

Package

Carbon for IBM Products

Description

A common design pattern is putting a Toggletip in the header of a Datagrid to provide more info. Normally, this works fine, however, it breaks when you use useSortableColumns. When you go to click on the Toggletip, the row sorting function will take "precendence," so you can't open the Toggletip.

Component(s) impacted

Datagrid
Toggletip (from @carbon/react)

Browser

Firefox

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

^1

Suggested Severity

None

Product/offering

IBM Cloud

CodeSandbox or Stackblitz example

https://codesandbox.io/p/sandbox/reverent-gianmarco-jzqnn9

Steps to reproduce the issue (if applicable)

Open the CodeSandbox. Observe how when you click on the "x" button in the Datagrid header, the Toggletip content will not open.

Then remove useSortableColumns from the Datagrid's state. Observe how clicking on the "x" Toggletip button will now open the content as expected.

Release date (if applicable)

No response

Code of Conduct

@amal-k-joy amal-k-joy added type: bug 🐛 Something isn't working component: Datagrid and removed type: bug 🐛 Something isn't working labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs triage 🧐
Development

No branches or pull requests

2 participants