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

手动修改formstate的值时触发对应form-item的校验 #8022

Open
1 task done
MyPledge opened this issue Jan 17, 2025 · 2 comments
Open
1 task done

手动修改formstate的值时触发对应form-item的校验 #8022

MyPledge opened this issue Jan 17, 2025 · 2 comments

Comments

@MyPledge
Copy link

MyPledge commented Jan 17, 2025

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

表单数据存在手动赋值的需求,但是目前手动赋值无法自动触发表单项校验

What does the proposed API look like?

无新增api,默认行为

@huangmingfu
Copy link

试试这个? const {id, onFieldChange, onFieldBlur} = useInjectFormItemContext()
文档

@MyPledge
Copy link
Author

MyPledge commented Jan 22, 2025

试试这个? const {id, onFieldChange, onFieldBlur} = useInjectFormItemContext() 文档

那所有控件都需要封装一遍了,成本太高了。

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

2 participants