Closed gabrieljablonski closed 3 months ago
The changes update the Tooltip component in a React application to enhance event handling and refine prop management. Deprecated props are removed, default event values are adjusted, and new global close events are added. These modifications improve tooltip behavior, especially for nested elements, ensuring tooltips update correctly when moving between parent and child elements.
File | Change Summary |
---|---|
docs/docs/options.mdx |
Updated Tooltip props, deprecated certain props, adjusted default values, added global close events. |
src/components/Tooltip/Tooltip.tsx |
Modified event handling logic, updated event types, added new event options. |
src/components/Tooltip/TooltipTypes.d.ts |
Added mouseover and mouseout events to AnchorOpenEvents and AnchorCloseEvents . |
Objective (Issue #) | Addressed | Explanation |
---|---|---|
Handle nested elements with tooltips (#1193) | ✅ |
In the world of code, where tooltips play, Events now guide them in a smoother way. From
mouseover
tomouseout
they glide, Nested elements no longer collide. So here's a cheer for tooltips bright, Enhancing our apps, day and night! 🌟🖱️
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Beta version released with the last commit 🚀
yarn add react-tooltip@5.26.4-beta.1194.rc.0
or
npm install react-tooltip@5.26.4-beta.1194.rc.0
Beta version released with the last commit 🚀
yarn add react-tooltip@5.26.4-beta.1194.rc.1
or
npm install react-tooltip@5.26.4-beta.1194.rc.1
Closes #1193
See this demo for explanation.
mouseover
andmouseout
apply to a wider range of scenarios, more specifically when dealing with nested tooltip anchors.mouseenter
andmouseleave
should still be present for backwards compatibility. But should we deprecate it and remove it on v6? Keeping it seems fine for more functionality, but will likely almost never be used.This will not impact current behavior for "regular" tooltip usage (no nested anchor elements).
Summary by CodeRabbit
New Features
mouseover
andmouseout
.Bug Fixes
Documentation