Replies: 1 comment
-
I not sure you will be able to handle this in a uncontrolled way as Radix-ui does not have a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to wrap the radixUI dialog primitive and having a very hard time triggering the Transition element on mount and unmount in an uncontrolled way (ie., that doesn't require an external useState.
I know this controlled version works (simplified for this question)...
But I can't seem to get an uncontrolled version to work.
appear={true}
prop in theTransition.Root
which activates the transition on mount. But when unmounting, the transition doesn't occur. I think becauseshow
remains true and the Portal simply unmounts without allowing for theTransition
to happen.Transition
component to trigger the leave transition when unmounting?Dialog.Content
component has a[data-state]
attribute ofopen
andclosed
. Is there a way to extract that attribute into a javascript variable so I can pass it into theTransition.Root
, in theshow
prop?Beta Was this translation helpful? Give feedback.
All reactions