You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component in my UI that is both a menu and a draggable handle. Via mouseDown, I can grab it and move it, but if I instead click it, it opens a headlessui-react Menu.
I can get around this by running v2.2.1, but it’d be nice if I could specify whether it opens via 'click' or 'mouseDown' — and this would help other folks in my position too. FWIW, this feels like a breaking change, but IDK the policy being followed for versioning.
Proposal: add a new prop to MenuButton that allows specifying "click" or "mouseDown" as the trigger action. Potentially called something like: "action" or "trigger" or "openVia":
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a component in my UI that is both a menu and a draggable handle. Via
mouseDown
, I can grab it and move it, but if I insteadclick
it, it opens a headlessui-reactMenu
.With the changes in @headlessui/[email protected], specifically https://github.com/tailwindlabs/headlessui/pull/3689/files, the described functionality no longer works. The new
mouseDown
handler prevents my drag event handlers from triggering and I can only drag-and-drop when the menu is open.I can get around this by running v2.2.1, but it’d be nice if I could specify whether it opens via 'click' or 'mouseDown' — and this would help other folks in my position too. FWIW, this feels like a breaking change, but IDK the policy being followed for versioning.
Proposal: add a new prop to
MenuButton
that allows specifying "click" or "mouseDown" as the trigger action. Potentially called something like: "action" or "trigger" or "openVia":Beta Was this translation helpful? Give feedback.
All reactions