-
Notifications
You must be signed in to change notification settings - Fork 544
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
fix(Modal): wait for transition to complete to reset state #1618
Conversation
d37e274
to
f5eb90e
Compare
Btw @genu , I think you can port this on |
Thanks, I will take a look |
@noook In testing it I can make this change, but since the issue doesn't exist, I'm hesitant to add a fix for a non-existent problem. Am I missing something? |
Hmm, maybe it doesn't happen. To make it short what happened with the modals when closing programmatically is that the reset was done before the transition was complete, which led to the transition being shorter as there is remaining component If you don't see any issues on your side then it's fine I guess |
I'll continue testing on my end and keep an eye out for issues that come up in the meantime. |
I take that back, I think I had some wonky caching issues before. I do see the issue as well in I'll get a PR ready for fix |
π Linked issue
Fixes #1557
β Type of change
π Description
When using modals programmatically, a few error happen:
To address these issues, we listen to the "after-leave" event fired by Headless UI's transition, so that we know it is safe to unmount the component.
π Checklist