mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
docs: update the doc of Form, ref: #2985
This commit is contained in:
parent
e645e3a8fa
commit
090fb16c77
@ -66,7 +66,7 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr
|
||||
|-----------|------------------------------------------|------------|
|
||||
| getFieldsValue | Get the specified fields' values. If you don't specify a parameter, you will get all fields' values. | Function([fieldNames: string[]]) |
|
||||
| getFieldValue | Get the value of a field. | Function(fieldName: string) |
|
||||
| setFieldsValue | Set the value of a field. | Function(obj: object) |
|
||||
| setFieldsValue | Set the value of a field.(Note: please don't use it in `componentWillReceiveProps`, otherwise, it will cause an endless loop, [more](https://github.com/ant-design/ant-design/issues/2985)) | Function(obj: object) |
|
||||
| setFields | Set the value and error of a field. | Function(obj: object) |
|
||||
| validateFields | Validate the specified fields and get theirs values and errors. | Function([fieldNames: string[]], [options: object], callback: Function(errors, values)) |
|
||||
| validateFieldsAndScroll | This function is similar to `validateFields`, but after validation, if the target field is not in visible area of form, form will be automatically scrolled to the target field area. | same as `validateFields` |
|
||||
|
@ -68,7 +68,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
||||
|-----------|------------------------------------------|------------|
|
||||
| getFieldsValue | 获取一组输入控件的值,如不传入参数,则获取全部组件的值 | Function([fieldNames: string[]]) |
|
||||
| getFieldValue | 获取一个输入控件的值 | Function(fieldName: string) |
|
||||
| setFieldsValue | 设置一组输入控件的值 | Function(obj: object) |
|
||||
| setFieldsValue | 设置一组输入控件的值(注意:不要在 `componentWillReceiveProps` 内使用,否则会导致死循环,[更多](https://github.com/ant-design/ant-design/issues/2985)) | Function(obj: object) |
|
||||
| setFields | 设置一组输入控件的值与 Error | Function(obj: object) |
|
||||
| validateFields | 校验并获取一组输入域的值与 Error | Function([fieldNames: string[]], [options: object], callback: Function(errors, values)) |
|
||||
| validateFieldsAndScroll | 与 `validateFields` 相似,但校验完后,如果校验不通过的菜单域不在可见范围内,则自动滚动进可见范围 | 参考 `validateFields` |
|
||||
|
Loading…
Reference in New Issue
Block a user