File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import { computeTooltipPosition } from '../../utils/compute-positions'
77import styles from './styles.module.css'
88import type { IPosition , ITooltip } from './TooltipTypes'
99
10+ let lastFloatPosition : IPosition | null = null
11+
1012const Tooltip = ( {
1113 // props
1214 id,
@@ -40,7 +42,6 @@ const Tooltip = ({
4042 const [ inlineArrowStyles , setInlineArrowStyles ] = useState ( { } )
4143 const [ show , setShow ] = useState < boolean > ( false )
4244 const [ calculatingPosition , setCalculatingPosition ] = useState ( false )
43- const [ lastFloatPosition , setLastFloatPosition ] = useState < IPosition | null > ( null )
4445 const { anchorRefs, setActiveAnchor : setProviderActiveAnchor } = useTooltip ( ) ( id )
4546 const [ activeAnchor , setActiveAnchor ] = useState < React . RefObject < HTMLElement > > ( { current : null } )
4647
@@ -147,7 +148,7 @@ const Tooltip = ({
147148 y : mouseEvent . clientY ,
148149 }
149150 handleTooltipPosition ( mousePosition )
150- setLastFloatPosition ( mousePosition )
151+ lastFloatPosition = mousePosition
151152 }
152153
153154 const handleClickTooltipAnchor = ( ) => {
You can’t perform that action at this time.
0 commit comments