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 = ({
4141 const tooltipHideDelayTimerRef = useRef < NodeJS . Timeout | null > ( null )
4242 const [ inlineStyles , setInlineStyles ] = useState ( { } )
4343 const [ inlineArrowStyles , setInlineArrowStyles ] = useState ( { } )
44- const [ show , setShow ] = useState < boolean > ( false )
44+ const [ show , setShow ] = useState ( false )
45+ const wasShowing = useRef ( false )
4546 const [ calculatingPosition , setCalculatingPosition ] = useState ( false )
4647 const lastFloatPosition = useRef < IPosition | null > ( null )
4748 const { anchorRefs, setActiveAnchor : setProviderActiveAnchor } = useTooltip ( ) ( id )
@@ -56,8 +57,11 @@ const Tooltip = ({
5657 }
5758 }
5859
59- // Callbacks
6060 useEffect ( ( ) => {
61+ if ( show === wasShowing . current ) {
62+ return
63+ }
64+ wasShowing . current = show
6165 if ( show ) {
6266 afterShow ?.( )
6367 } else {
You can’t perform that action at this time.
0 commit comments