-
-
Notifications
You must be signed in to change notification settings - Fork 278
feat: Field support initialValue
#111
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
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/react-component/field-form/3xte27j8x |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
=======================================
Coverage 99.87% 99.88%
=======================================
Files 13 13
Lines 818 862 +44
Branches 177 180 +3
=======================================
+ Hits 817 861 +44
Misses 1 1
Continue to review full report at Codecov.
|
这个是啥意思? |
相同 <Form>
<Field name="test" initialValue="light">
<Input />
</Field>
<Field name="test" initialValue="bamboo">
<Input />
</Field>
</Form> |
这样的场景会是如何表现,condition 变化的情况下。 |
第一次 mount 的 Field 的 |
还有一种情况。
|
Form 的
这里 Field 的不生效,但是 Form 的是生效的。Form 的 |
就等这个啦 😄 |
resolve ant-design/ant-design#21816
在动态 Field,Form level 的
initialValues
的确比较乏力。Field 添加回来initialValue
,遵循以下规则:initialValue
同 Form 的initialValues
冲突时initialValue
不生效并 warninginitialValue
时initialValue
不生效并 warninginitialValue
只 Field 第一次 mount 时才生效resetFields
重置initialValues
为准