[Tooltip] Placement initially incorrect after being updated #18790
Labels
bug 🐛
Something doesn't work
component: tooltip
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
Current Behavior 😯
When Tooltip placement is updated (e.g. via a state change) the initial hover event shows the Tooltip in the wrong position, as if placement is set to
-start
. This is only an issue on the first hover as on subsequent hover events the Tooltip displays as expected.Example: If set from
bottom
toright
, the initial hover will appear as though the Tooltip isright-start
.This doesn't seem to be a issue when using Popper in a similar manner.
Expected Behavior 🤔
The Tooltip should be positioned relevent to the current placement on all hover events.
Steps to Reproduce 🕹
Code SandBox
Steps:
Context 🔦
I was trying to make tooltips change from
right
tobottom
based on amediaQuery
.Your Environment 🌎
The text was updated successfully, but these errors were encountered: