File tree 1 file changed +15
-3
lines changed 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,27 @@ const TooltipTemplate = React.forwardRef(
72
72
style,
73
73
children,
74
74
arrowProps,
75
- popper : _ ,
76
- show : _2 ,
75
+ popper,
76
+ show,
77
+ hasDoneInitialMeasure,
77
78
...props
78
79
} ,
79
80
ref
80
81
) => {
81
82
const [ primaryPlacement ] = placement ?. split ( '-' ) || [ ] ;
82
83
const bsDirection = getOverlayDirection ( primaryPlacement ) ;
83
84
85
+ const computedStyle = style ;
86
+ if ( show && ! hasDoneInitialMeasure )
87
+ computedStyle = {
88
+ ...style ,
89
+ position : popper ?. strategy ,
90
+ top : '0' ,
91
+ left : '0' ,
92
+ opacity : '0' ,
93
+ pointerEvents : 'none'
94
+ } ;
95
+
84
96
const {
85
97
handleMouseOverTooltipContent,
86
98
handleMouseLeaveTooltipContent
@@ -89,7 +101,7 @@ const TooltipTemplate = React.forwardRef(
89
101
return (
90
102
< div
91
103
ref = { ref }
92
- style = { style }
104
+ style = { computedStyle }
93
105
role = "tooltip"
94
106
x-placement = { primaryPlacement }
95
107
className = { classNames (
You can’t perform that action at this time.
0 commit comments