Skip to content

Commit

Permalink
fix(Overlay): fix arrow animation (#6551)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang committed Feb 14, 2023
1 parent dd70349 commit 21b9981
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Popover.tsx
Expand Up @@ -101,7 +101,7 @@ const Popover = React.forwardRef<HTMLDivElement, PopoverProps>(
arrowProps,
hasDoneInitialMeasure,
popper,
show: _,
show,
...props
},
ref,
Expand All @@ -112,7 +112,7 @@ const Popover = React.forwardRef<HTMLDivElement, PopoverProps>(
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);

let computedStyle = style;
if (!hasDoneInitialMeasure) {
if (show && !hasDoneInitialMeasure) {
computedStyle = {
...style,
...getInitialPopperStyles(popper?.strategy),
Expand Down
4 changes: 2 additions & 2 deletions src/Tooltip.tsx
Expand Up @@ -92,7 +92,7 @@ const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
arrowProps,
hasDoneInitialMeasure,
popper,
show: _,
show,
...props
}: TooltipProps,
ref,
Expand All @@ -104,7 +104,7 @@ const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);

let computedStyle = style;
if (!hasDoneInitialMeasure) {
if (show && !hasDoneInitialMeasure) {
computedStyle = {
...style,
...getInitialPopperStyles(popper?.strategy),
Expand Down

0 comments on commit 21b9981

Please sign in to comment.