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

[Form] feature description for this component #2724

Open
xuhen opened this issue Feb 22, 2025 · 0 comments
Open

[Form] feature description for this component #2724

xuhen opened this issue Feb 22, 2025 · 0 comments
Labels
feature request Request new feature

Comments

@xuhen
Copy link

xuhen commented Feb 22, 2025

Which Component Need Enhancement 期望新增功能的组件

  • Form 组件

What does the proposed API look like 期望支持的API

asyncGetFormValidate(): boolean

Feature Description 功能描述

formRef.current.asyncGetFormValidate()

Additional information 补充说明

当前在项目中遇到需要这样的使用的场景,修改表单项,如果表单 valid 就用表单里所有参数,新发起一个请求到后端,拿到结果展示下信息;如果invalid 就什么信息都不显示。

validate 函数不能满足这个需求的原因是会触发ui层面的反馈,但是这里想要静默拿到验证成功后的结果

我还有个思路,也可以在 Form 上加一个回调函数,每当校验的时候就调用一下可以拿到整个 form 的valid 结果。

@xuhen xuhen added the feature request Request new feature label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new feature
Projects
None yet
Development

No branches or pull requests

1 participant