You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set unmount={false} on the root <Transition> component do I have to set it on <Dialog>, <Transition.Child> nr 1, <Transition.Child> nr 2, etc components as well?
If I set it on the root <Transition> component only, then my <Dialog> component's state breaks/gets unmounted.
If I set unmount={false} on the root <Transition> component and all child components then my <Dialog> component's state works - this is a bit unintuitive; you should only need to set it on the root <Transition> component IMO like you do with show.
Thanks!
Update: Collected discussion threads where there's some info:
The text was updated successfully, but these errors were encountered:
spacecat
changed the title
[DOCS]: There is basically 0 info about unmount in docs for Dialog and Transition components
[DOCS]: Add info about unmount in docs for relationship between Transition and child components
Jan 2, 2024
Hi, I'm on version
"@headlessui/react": "2.0.0-alpha.3"
of HeadlessUI.I have the following component structure:
If I set
unmount={false}
on the root<Transition>
component do I have to set it on<Dialog>
,<Transition.Child>
nr 1,<Transition.Child> nr 2
, etc components as well?If I set it on the root
<Transition>
component only, then my<Dialog>
component's state breaks/gets unmounted.If I set
unmount={false}
on the root<Transition>
component and all child components then my<Dialog>
component's state works - this is a bit unintuitive; you should only need to set it on the root<Transition>
component IMO like you do withshow
.Thanks!
Update: Collected discussion threads where there's some info:
#44 (comment)
#799
#800 (comment)
#1941 (comment)
The text was updated successfully, but these errors were encountered: