mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
docs: update docs for Form, ref: #2591
This commit is contained in:
parent
c04ba5b39b
commit
5b5439208c
@ -78,7 +78,7 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr
|
||||
|
||||
#### Special attention
|
||||
|
||||
Can't use `getFieldProps` in functional components: https://github.com/facebook/react/pull/6534
|
||||
If you use `react@<15.3.0`, then, you can't use `getFieldProps` in functional components: https://github.com/facebook/react/pull/6534
|
||||
|
||||
The return value of `getFieldProps` contains `id`、`value`(or any other props `valuePropName` that you specified),`ref`,`onChange`(or any other `trigger` `validateTrigger` that you specified), **shouldn't set same property again** in order to avoid conflict. If you concerntate on the details on return value, you can print them to console by `console.log`.
|
||||
|
||||
|
@ -80,7 +80,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
||||
|
||||
#### 特别注意
|
||||
|
||||
`getFieldProps` 调用不能位于纯函数组件中: https://github.com/facebook/react/pull/6534
|
||||
如果使用的是 `react@<15.3.0`,则 `getFieldProps` 调用不能位于纯函数组件中: https://github.com/facebook/react/pull/6534
|
||||
|
||||
`getFieldProps` 返回的属性包括 `id`、`value`(或你设置的其它 `valuePropName`)、`ref`、`onChange`(或者你设置的其它 `trigger` `validateTrigger`),**所以不应再设置同样的属性**,以免冲突。如果对其返回值的细节有兴趣,可以 `console.log` 出来查看。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user