@@ -36,7 +36,8 @@ export const Heatmap = ({path, database, databaseFullPath}: HeatmapProps) => {
3636 tablet : IHeatmapTabletData ;
3737 position : { left : number ; top : number } ;
3838 } | null > ( null ) ;
39- const tabletTooltipAnchorRef = React . useRef < HTMLDivElement | null > ( null ) ;
39+ const [ tabletTooltipAnchorElement , setTabletTooltipAnchorElement ] =
40+ React . useState < HTMLDivElement | null > ( null ) ;
4041 const isTabletTooltipHoveredRef = React . useRef ( false ) ;
4142
4243 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
@@ -132,7 +133,7 @@ export const Heatmap = ({path, database, databaseFullPath}: HeatmapProps) => {
132133 < div ref = { itemsContainer } className = { b ( 'items' ) } >
133134 { tabletTooltip ? (
134135 < div
135- ref = { tabletTooltipAnchorRef }
136+ ref = { setTabletTooltipAnchorElement }
136137 className = { b ( 'tooltip-anchor' ) }
137138 style = { {
138139 left : tabletTooltip . position . left ,
@@ -165,7 +166,7 @@ export const Heatmap = ({path, database, databaseFullPath}: HeatmapProps) => {
165166 open
166167 hasArrow
167168 placement = { [ 'top' , 'bottom' , 'left' , 'right' ] }
168- anchorElement = { tabletTooltipAnchorRef . current }
169+ anchorElement = { tabletTooltipAnchorElement }
169170 onOutsideClick = { handleHideTabletTooltip }
170171 >
171172 < div
0 commit comments