Open darkpursuer opened 4 months ago
@darkpursuer I think I know the reason for this bug. It seems like the issue is caused by a problem with a third-party library import {useTooltipTriggerState} from "@react-stately/tooltip";
,on onOpenChange
didn't trigger when the mouse hovers over the child element. in 145line: const isOpen = state.isOpen && !isDisabled;
and state.isOpen
alway 'false'.
Thanks! Any althernative to fix it?
My current fix is to move the Tooltip
inside CustomButton
.
@darkpursuer i'wll try to fix it
@darkpursuer , i resolved this problem by adding a div around my component. Maybe this solution will work for you too.
@darkpursuer , i resolved this problem by adding a div around my component. Maybe this solution will work for you too.
This also worked for me when using the Popover component and having the button inside the PopoverTrigger
NextUI Version
2.2.9
Describe the bug
I am using a function component which returns two siblings, and I was trying to use
<Tooltip>
to wrap this component, but it did not work. I also tried to useforwardRef
, but although the ref is successfully passed to the Tooltip, the Tooltip did not work correctly. Please find my sample code below.I am not really familiar with how the ref works in Tooltip, and I am not sure if this the correct way.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
<Tooltip>
:Expected behavior
When hovering on the Button inside the CustomButton component, the tooltip should show.
Screenshots or Videos
No response
Operating System Version
Linux
Browser
Chrome