Skip to content

Commit e48db29

Browse files
fix: watch for delayShow/delayHide changes
1 parent 3727065 commit e48db29

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ const Tooltip = ({
635635
closeEvents,
636636
globalCloseEvents,
637637
shouldOpenOnClick,
638+
delayShow,
639+
delayHide,
638640
])
639641

640642
useEffect(() => {
@@ -806,6 +808,13 @@ const Tooltip = ({
806808
}
807809
}, [id, anchorSelect, imperativeOptions?.anchorSelect])
808810

811+
useEffect(() => {
812+
if (tooltipShowDelayTimerRef.current) {
813+
clearTimeout(tooltipShowDelayTimerRef.current)
814+
handleShowTooltipDelayed(delayShow)
815+
}
816+
}, [delayShow])
817+
809818
const actualContent = imperativeOptions?.content ?? content
810819
const canShow = show && Object.keys(inlineStyles).length > 0
811820

0 commit comments

Comments
 (0)