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

[FR]: Form表单新增一个setFieldValue(name: NamePath, value: any)的方法 #2541

Closed
David19910306 opened this issue Aug 15, 2024 · 1 comment · Fixed by #2772
Closed
Assignees

Comments

@David19910306
Copy link

这个功能解决了什么问题?

能够允许用户设置单个表单的值。目前如果使用setFieldsValue设置的话,如果在表单图片上传,或者是弹框选择的情况下,使用setFieldsValue或导致其他必填但是还未填的表单项提示内容缺失。页面非常不友好。

你期望的组件设计是怎样的?

setFieldValue(name: NamePath, value: any),根据表单的name字段来设置表单项的值。于antd-mobile的方法一直

@TSjianjiao
Copy link

setFieldsValue实际上有第二个参数,设置为false就不会校验表单。你可以使用validatefields手动触发校验,不过可能会遇到#2588这个问题

@oasis-cloud oasis-cloud self-assigned this Sep 18, 2024
@oasis-cloud oasis-cloud linked a pull request Nov 5, 2024 that will close this issue
@oasis-cloud oasis-cloud linked a pull request Nov 21, 2024 that will close this issue
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants