-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
feat(Modal): add onOpenChange prop #40852
Conversation
先开个 pr 备忘,等后续 rc-dialog 发版了,这边还需要更新一下依赖 |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #40852 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 607 608 +1
Lines 10298 10343 +45
Branches 2790 2804 +14
=========================================
+ Hits 10298 10343 +45
... and 28 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
draft吧 |
麻烦大佬帮忙标记下哈,我暂时没权限 @yoyo837 |
onOpenChanged ? |
这种应该叫 afterOpen 吧 |
onOpenChange 更灵活一点吧 |
项目里都用的 onOpenChange,就跟之前保持一致了。我改下 rc-dialog 那边吧 |
onCancel 应该够了,Modal 没有非受控情况下自主打开的能力,不太需要 onOpen。因为是 open 受控,所以开发者本身是能感知什么时候打开的。 Modal 打开和关闭有动画,所以可能需要 afterOpen 和 afterClose 的能力。 |
大佬,可能我的理解还有点问题,再确认下哈。我理解为 afterOpen 和 afterClose 合并起来就是 onOpenChange 了,所以目前不需要改动啥是吗 |
ef20788
to
0a3059e
Compare
afterOpen 和 afterClose 是动画结束那一刻,不是状态切换那一刻。 |
|
* test: fix Modal footer test cov * test: fix Modal footer test cov * fix footer * Update components/modal/PurePanel.tsx Co-authored-by: MadCcc <1075746765@qq.com> * fix footer --------- Co-authored-by: MadCcc <1075746765@qq.com>
Co-authored-by: xiechensheng <xiechensheng@kezaihui.com>
…right (ant-design#41139) * fix: 稳定格式错乱啦 * Update drag-sorting-handler.tsx * Update drag-sorting-handler.tsx --------- Co-authored-by: zhanghaoqiang <zhanghq7458@joyowo.com>
* test: update snapshot * chore: update --------- Co-authored-by: MadCcc <1075746765@qq.com>
* docs: fix duplicated desc * fix: use remark plugin * chore: fix ghost deps * chore: better assign * chore: use regexp * chore: remove try catch
* test: update snapshot * test: use render * test: fix skip * test: fix skip
* test: fix ci fail * fix * fix
Hi @MuxinFeng. Thanks for your contribution. The path |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
close #40810
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge