fix: defer popper style recalc until use (#7330)

This commit is contained in:
Zach Pomerantz 2023-09-21 11:29:43 -07:00 committed by GitHub
parent 5e1c430657
commit d73c368ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()