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'
7
7
import styles from './styles.module.css'
8
8
import type { IPosition , ITooltip } from './TooltipTypes'
9
9
10
+ let lastFloatPosition : IPosition | null = null
11
+
10
12
const Tooltip = ( {
11
13
// props
12
14
id,
@@ -40,7 +42,6 @@ const Tooltip = ({
40
42
const [ inlineArrowStyles , setInlineArrowStyles ] = useState ( { } )
41
43
const [ show , setShow ] = useState < boolean > ( false )
42
44
const [ calculatingPosition , setCalculatingPosition ] = useState ( false )
43
- const [ lastFloatPosition , setLastFloatPosition ] = useState < IPosition | null > ( null )
44
45
const { anchorRefs, setActiveAnchor : setProviderActiveAnchor } = useTooltip ( ) ( id )
45
46
const [ activeAnchor , setActiveAnchor ] = useState < React . RefObject < HTMLElement > > ( { current : null } )
46
47
@@ -147,7 +148,7 @@ const Tooltip = ({
147
148
y : mouseEvent . clientY ,
148
149
}
149
150
handleTooltipPosition ( mousePosition )
150
- setLastFloatPosition ( mousePosition )
151
+ lastFloatPosition = mousePosition
151
152
}
152
153
153
154
const handleClickTooltipAnchor = ( ) => {
You can’t perform that action at this time.
0 commit comments