mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(tooltip): behavior of tooltip trigger with delay (#1278)
* fix(tooltip): use trigger-props instead of custom on-pointer events * chore(changeset): add tooltip changeset
This commit is contained in:
parent
cd1dc8b469
commit
a1a02dc0db
5
.changeset/olive-hounds-bake.md
Normal file
5
.changeset/olive-hounds-bake.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/tooltip": patch
|
||||
---
|
||||
|
||||
Fix the trigger behavior to prevent it from opening again after the delay is not reached and the cursor moves out.
|
||||
@ -208,8 +208,6 @@ export function useTooltip(originalProps: UseTooltipProps) {
|
||||
...mergeProps(triggerProps, props),
|
||||
ref: mergeRefs(_ref, triggerRef),
|
||||
"aria-describedby": isOpen ? tooltipId : undefined,
|
||||
onPointerEnter: () => state.open(),
|
||||
onPointerLeave: () => state.isOpen && state.close(),
|
||||
}),
|
||||
[triggerProps, isOpen, tooltipId, state],
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user