-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onAnimationEnd is not called after the opening animation (when using the open
prop)
#520
Comments
Agreed - and would also be helpful if |
@emilkowalski facing this issue as well. |
It is related to the same I think the best way is either to move onChange body to useEffect to remove dependency of Radix implementation, or add useEffect inside useControllableState to call onChange there when state changes no matter controlled or not |
Facing the same issue. IMO this is a bug because regardless of whether the drawer is controlled or not there is an animation opening/closing it. Use case: reseting the drawer's state once the animation has ended to prevent UI changes to be visible to the user. In the code TIMEOUT_DURATION_IN_SECONDS = 0.5;
setTimeout(
() => {
// Your code
},
TIMEOUT_DURATION_IN_SECONDS * 1000,
); |
Issue
On a controlled drawer (that uses the
open
prop to open/close, as its state is managed by a parent component),the
onAnimationEnd
prop function is not called after the opening transition.Expectations
onAnimationEnd
should always be called after the opening transition, even when using theopen
prop instead of aVaul.Trigger
Reproduction
Codesandbox link: https://codesandbox.io/p/devbox/zzfxtc
The text was updated successfully, but these errors were encountered: