Is the disable animation logic of the modal component correct? #5446
FerretAngel
started this conversation in
Feedback
Replies: 0 comments
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.
-
In the file modal.tsx, there is a logic as follows
Is it correct to still render the AnimatePresence component when disableAnimation = true && isOpen=false? Shouldn't disabling animation disable all animation-related components? I think the correct way should be this. Who can tell me the reason for this design? Why isn't the logic like the following?
The following is unrelated background information:
When I was encapsulating a popup animation using viewtransition based on the modal component, I found that disabling animation would cause the modal component to not be unmounted in time. This results in two identical viewTransitionNames at that moment, causing my transition animation to fail.
The following is the effect I want to achieve:
When the browser supports viewTransition:
4aa0499da38c537ca7f8af93ef1dfd1e.mp4
When the browser does not support the viewTransition feature:
c723cc5736a915a928a27b7f7f39af97.mp4
Beta Was this translation helpful? Give feedback.
All reactions