File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 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(
7272 style,
7373 children,
7474 arrowProps,
75- popper : _ ,
76- show : _2 ,
75+ popper,
76+ show,
77+ hasDoneInitialMeasure,
7778 ...props
7879 } ,
7980 ref
8081 ) => {
8182 const [ primaryPlacement ] = placement ?. split ( '-' ) || [ ] ;
8283 const bsDirection = getOverlayDirection ( primaryPlacement ) ;
8384
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+
8496 const {
8597 handleMouseOverTooltipContent,
8698 handleMouseLeaveTooltipContent
@@ -89,7 +101,7 @@ const TooltipTemplate = React.forwardRef(
89101 return (
90102 < div
91103 ref = { ref }
92- style = { style }
104+ style = { computedStyle }
93105 role = "tooltip"
94106 x-placement = { primaryPlacement }
95107 className = { classNames (
You can’t perform that action at this time.
0 commit comments