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]: The Toggletip component truncates when it is inside a data table #14677

Open
2 tasks done
Sebastian-Ribeiro opened this issue Sep 18, 2023 · 3 comments
Open
2 tasks done

Comments

@Sebastian-Ribeiro
Copy link

Package

@carbon/react

Browser

No response

Package version

v1.33.2

React version

v17.0.2

Description

When a toggletip is added to a data table component as it is added inside the table in the dom, the toggletip component gets truncated by the header of the data table. It would be nice to have a prop to decide in which part of the dom do we want the toggletip to be added.

Reproduction/example

https://stackblitz.com/edit/github-sretdv?file=src%2FApp.jsx

Steps to reproduce

  1. Create a Data table with a toggletip component in one of the cells
  2. Click on the toggletip and see the tooltip gets truncated

Suggested Severity

None

Application/PAL

No response

Code of Conduct

@tw15egan
Copy link
Collaborator

Related: #14139

@kurtwaldowski-b
Copy link

This feels like an issue with how the tooltip is implemented at its core; other UI libraries will generally used fixed positioning and or insert a dom element at the top of the dom and use translates to properly position the tooltip. Any time the tooltip is within a container that is not at the top of the dom, these risk getting cut off when generally tooltips should always be on top of other elements no matter how nested the element its wrapped around is within the dom.

@nikku
Copy link

nikku commented Sep 18, 2024

How is this waiting for authors response (looking at the assigned GitHub label)? I assume this is a simple, clearly qualified bug report.

The current implementation of Carbon Tooltips, as indicated earlier makes it impossible to use them in a robust manner inside scrollable containers (such as data table), due to positioning and overflow interplay in browsers. A robust implementation uses fixed positioning for tooltips, and/or makes them live outside of the overflow: auto scrollable container.

As my team is currently investigating options for working around this issue, could we get a quick update from the team: Is this something that you plan to address, and if so, do you have a rough timeline?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

5 participants