infinite open→close→open→close when trying to trigger dropdown on hover #3155
Unanswered
BorisTheTripper
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to define a dropdown that is triggered on hover (
mouseenter
&mouseleave
) instead of on click. However, when I hover over a trigger, it just creates an infinite event cycle ofmouseenter
, immediately followed bymouseleave
, and going in circles ad infinitum. I suppose that changing the state causes the component to re-render, unmounting the previous trigger and firingmouseleave
again.I understand that this is more of a React question than a Radix question, but I thought I might get quality feedback here too. What might be a quick solution to this problem?
Beta Was this translation helpful? Give feedback.
All reactions