Skip to content
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

🐛[BUG] ModalFrom在同时设置了formRef、request和destroyOnClose时,加载过程中关闭ModalForm会报错 #8858

Open
ly4236 opened this issue Nov 13, 2024 · 0 comments

Comments

@ly4236
Copy link
Contributor

ly4236 commented Nov 13, 2024

🐛 bug 描述

ModalFrom在同时设置了formRef、request和destroyOnClose时,加载过程中关闭ModalForm会报错 “form.resetFields is not a function”。

📷 复现步骤

codesandbox

© 版本信息

  • ProComponents 版本 : 2.7.15
  • umi 版本 : 4.3.12
  • 浏览器环境 : edge
  • 开发环境 : windows

暂时解决方案

不在使用 request,用 formRef 接管。不过这样的话,不知道怎么让 form 进入 loading 状态。

想知道开发者对于 request 的设计思路。是一次性加载完全部数据时才使用,还是只要是首次加载(表单需要其他操作来确认其他数据)就可以使用。

@ly4236 ly4236 changed the title 🐛[BUG] ModalFrom在同时设置了request和destroyOnClose时,加载过程中会报错 🐛[BUG] ModalFrom在同时设置了request和destroyOnClose时,加载过程中关闭ModalForm会报错 Nov 13, 2024
@ly4236 ly4236 changed the title 🐛[BUG] ModalFrom在同时设置了request和destroyOnClose时,加载过程中关闭ModalForm会报错 🐛[BUG] ModalFrom在同时设置了formRef、request和destroyOnClose时,加载过程中关闭ModalForm会报错 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant