-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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 async #23826
fix: Modal async #23826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
* https://github.com/ant-design/ant-design/issues/23623 | ||
* Sync render blocks React event. Let's make this async. | ||
*/ | ||
setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要 clear 么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用,Modal.xxx 没有生命周期。clear 用的是 Modal.destroyAll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这么说 destroyAll 和 destroy 的时候是需要 clear 的,万一两个方法连续调用。
Modal.confirm();
Modal.destroyAll();
/rebase |
8af51d7
to
1ee9912
Compare
静态方法是在 React 生命周期外的,没有调用 portal 的时机。 |
🤔 This is a ...
🔗 Related issue link
resolve #23623
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge