epam / epam/UUI

[Tooltip]: add possibility to enable tooltip only if toggler is overflowed

Open
#2,712 0 comments 0 reactions 0 assignees View on GitHub
Contributor needed improvement
Dominant language
TypeScript
Stars
247
Forks
78
Avg merge
14h 27m
Merged PRs (30d)
15

Description

## Description
It’s a common use case to enable tooltips only when the text in the tooltip target is truncated.
For example, we have a request to add this behavior for the DataTable column header name: https://github.com/epam/UUI/issues/2710.

## To Do
Let’s try to find a solution for detecting when a target node is overflowed and enabling tooltip by hover if yes. The solution should have minimal impact on performance (e.g., avoid triggering reflows on each render) and work for most general cases.
If it's possible, we can introduce a prop, such as enableWhenOverflowed (the naming should be carefully considered), to enable this behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.