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'm trying to add a tooltip to a button (e.g. <Tooltip><Button /></Tooltip>), but it seems headlessui blocks event handlers when adding an aria-disabled prop to Button.
I didn't find any mention of this in the docs (although I think this is what happening based on reading the source).
I think I understand why the behaviour is like this – it prevents onClick from working when aria-disabled is present. But it also seems to mean that onMouseEnter etc. don't work.
What's the best way to make this work with headlessui's Button?
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
-
I'm trying to add a tooltip to a button (e.g.
<Tooltip><Button /></Tooltip>
), but it seems headlessui blocks event handlers when adding anaria-disabled
prop toButton
.I didn't find any mention of this in the docs (although I think this is what happening based on reading the source).
I think I understand why the behaviour is like this – it prevents
onClick
from working whenaria-disabled
is present. But it also seems to mean thatonMouseEnter
etc. don't work.What's the best way to make this work with headlessui's
Button
?Beta Was this translation helpful? Give feedback.
All reactions