[Tooltip]: add possibility to enable tooltip only if toggler is overflowed
Open
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
Assessment
This issue has not been assessed yet.