Skip to content

Commit 3727065

Browse files
fix: ignore delayShow if tooltip is already rendered
1 parent 6d01157 commit 3727065

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ const Tooltip = ({
244244
clearTimeout(tooltipShowDelayTimerRef.current)
245245
}
246246

247+
if (rendered) {
248+
// if the tooltip is already rendered, ignore delay
249+
handleShow(true)
250+
return
251+
}
252+
247253
tooltipShowDelayTimerRef.current = setTimeout(() => {
248254
handleShow(true)
249255
}, delay)

0 commit comments

Comments
 (0)