-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🧐[问题]ProFormDateTimePicker怎么设置成受控组件,我需要 #8807
Comments
huangnan20030709
changed the title
🧐[问题]ProFormDateTimePicker怎么给
🧐[问题]ProFormDateTimePicker怎么设置成受控组件,我需要
Oct 18, 2024
自己封装一个就是了 |
主要是这个组件给传prop一个状态不管用啊,下一次渲染value值,它不会重新更新 |
一个扁担组件只要有 |
没问题的吗,这么奇怪,我再看看,谢谢大佬 |
想了一下,虽然不知道你为啥要表单组件受控,但是应该有两种方法。1是自己封装,然后在Form.Item里面包裹就行了,封装的组件需要提供value和onChange两个属性,2,使用表单的onValuesChange方法,能拿到表单的所有字段值,然后用formRef去设置字段值,这个应该更简单 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
💻 示例代码
🚑 其他信息
The text was updated successfully, but these errors were encountered: