diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c522f7..50af462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improve outside click support ([#1175](https://github.com/tailwindlabs/headlessui/pull/1175)) - Ensure that `appear` works regardless of multiple rerenders ([#1179](https://github.com/tailwindlabs/headlessui/pull/1179)) - Reset Combobox Input when the value gets reset ([#1181](https://github.com/tailwindlabs/headlessui/pull/1181)) +- Fix double `beforeEnter` due to SSR ([#1183](https://github.com/tailwindlabs/headlessui/pull/1183)) ## [Unreleased - @headlessui/vue] diff --git a/packages/@headlessui-react/src/components/transitions/transition.tsx b/packages/@headlessui-react/src/components/transitions/transition.tsx index d13dc79..ce83116 100644 --- a/packages/@headlessui-react/src/components/transitions/transition.tsx +++ b/packages/@headlessui-react/src/components/transitions/transition.tsx @@ -279,6 +279,7 @@ let TransitionChild = forwardRefWithAs(function TransitionChild< useIsoMorphicEffect(() => { let node = container.current if (!node) return + if (!ready) return if (skip) return if (show === prevShow.current) return @@ -328,6 +329,7 @@ let TransitionChild = forwardRefWithAs(function TransitionChild< container, skip, show, + ready, enterClasses, enterFromClasses, enterToClasses,