Skip to content

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

@ly4236

Description

@ly4236

🐛 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 的设计思路。是一次性加载完全部数据时才使用,还是只要是首次加载(表单需要其他操作来确认其他数据)就可以使用。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions