File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ const Tooltip = ({
41
41
const tooltipHideDelayTimerRef = useRef < NodeJS . Timeout | null > ( null )
42
42
const [ inlineStyles , setInlineStyles ] = useState ( { } )
43
43
const [ inlineArrowStyles , setInlineArrowStyles ] = useState ( { } )
44
- const [ show , setShow ] = useState < boolean > ( false )
44
+ const [ show , setShow ] = useState ( false )
45
+ const wasShowing = useRef ( false )
45
46
const [ calculatingPosition , setCalculatingPosition ] = useState ( false )
46
47
const lastFloatPosition = useRef < IPosition | null > ( null )
47
48
const { anchorRefs, setActiveAnchor : setProviderActiveAnchor } = useTooltip ( ) ( id )
@@ -56,8 +57,11 @@ const Tooltip = ({
56
57
}
57
58
}
58
59
59
- // Callbacks
60
60
useEffect ( ( ) => {
61
+ if ( show === wasShowing . current ) {
62
+ return
63
+ }
64
+ wasShowing . current = show
61
65
if ( show ) {
62
66
afterShow ?.( )
63
67
} else {
You can’t perform that action at this time.
0 commit comments