tailwindlabs / headlessui

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

<TransitionChild> does not work when unmount is set to false #3375

Open spacecat opened 1 month ago

spacecat commented 1 month ago

I think this one is related to https://github.com/tailwindlabs/headlessui/issues/3348

Repro:

  1. Go to https://tailwindui.com/components/application-ui/application-shells/sidebar
  2. Take the react code from the first example: https://tailwindui.com/components/application-ui/application-shells/sidebar#component-73d9b2c2e2af9184f305f06649710086
  3. Add unmount={false} to the <Dialog> component )
  4. Now <TransitionChild> is broken - The Close (X) button at the top right dissapears on mobile!

I'm using "@headlessui/react": "^0.0.0-insiders.a36380f",

RobinMalfait commented 1 month ago

Hey!

Small update in the meantime. You can add unmount={false} to the <TransitionChild /> to work around this for now.

spacecat commented 1 month ago

Thanks @RobinMalfait, it's working!

When do you think there will be a new version of headless UI? :) The latest version is 2.1.2 I believe.