-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🧐[问题]ModalForm 关闭时 onOpenChange 触发2次 open 都是fasle #7545
Comments
@chenshuai2144 应该是onFinish触发了一次 setOpen(false)又触发了一次, |
搞个 pr 吧,做个判断。而且没不影响。 |
Hello @YuShai. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @YuShai,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请务必提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
试了,还是存在一点影响的,我没有去使用onOpenChange |
onFinish我没有去return true; |
绕开了 也不是啥好办法 |
今天在查询Redux Actions时偶然发现了 https://github.com/ant-design/pro-components/blob/master/packages/form/src/layouts/ModalForm/index.tsx#L97-L250 我觉得最简单的修复方法就是修改 |
我也遇到了相似的问题,但是为什么在我的 Case 中表现是 open 为 true 时触发两次,为false时触发1次,求大佬们解惑 |
🧐 问题描述
ModalForm onOpenChange function在关闭时候被触发2次,打开的时候触发1次,关闭时触发2次的open都是false。求解惑
💻 示例代码
The text was updated successfully, but these errors were encountered: