From d73c368ee48d4b0b4bbe227e5a88a2b56f797d60 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Thu, 21 Sep 2023 11:29:43 -0700 Subject: [PATCH] fix: defer popper style recalc until use (#7330) --- src/components/Popover/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Popover/index.tsx b/src/components/Popover/index.tsx index ae044aa5e0..067ee20992 100644 --- a/src/components/Popover/index.tsx +++ b/src/components/Popover/index.tsx @@ -112,7 +112,7 @@ export default function Popover({ [placement, offsetX, offsetY, arrowElement] ) - const { styles, update, attributes } = usePopper(referenceElement, popperElement, options) + const { styles, update, attributes } = usePopper(referenceElement, show ? popperElement : null, options) const updateCallback = useCallback(() => { update && update()