headlessui
headlessui copied to clipboard
<Dialog> won't open when unmount is set to false
What package within Headless UI are you using?
"@headlessui/react": "0.0.0-insiders.fbad6a9",
What browser are you using? Chrome Version 126.0.6478.127 (Official Build) (arm64)
Reproduction URL
https://github.com/spacecat/headless-ui-dialog-unmount
Describe your issue
- Follow the docs here: https://headlessui.com/react/dialog
- Add a basic dialog with a backdrop and transitions
- Add
unmount={false}to the<Dialog>component - The dialog will not open when you add
unmount={false}to the<Dialog>component
If you comment out transition on both the <DialogBackdrop> and <DialogPanel> while keeping unmount={false} on <Dialog>, the dialog will start working again when you click the button.