tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.02k stars 1.03k forks source link

transition context conflict #3322

Closed haola1210 closed 6 days ago

haola1210 commented 1 week ago

@headlessui/react

v2.1.0

Chrome

Describe your issue

I created a component called MyDrawer with the Transition component. I render children inside the TransitionChild Inside MyDrawer, I use a Dialog component and add transition props to the DialogPanel component. When I close the Dialog (click on the backdrop) -> the  dom content of the TransitionChild is gone

it's ok when I remove the transition props from the DialogPanel component. but then my Dialog wont have animation :(

RobinMalfait commented 1 week ago

Hey!

Can you share a minimal reproduction?

RobinMalfait commented 6 days ago

I figured out a reproduction that seems to reproduce this. So this should be fixed by #3331, and will be available in the next release. If this does not fix your issue after testing, please open a new issue with a minimal reproduction GitHub repo attached.

You can already try it using: