docs: Update complex-form-control.md (#28311)

Fixing some typos and grammar issues.
This commit is contained in:
arange 2020-12-11 13:30:40 +11:00 committed by GitHub
parent 32470b2b08
commit d372028476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ title:
## en-US
This demo show how to use `Form.Item` with multiple controls. `<Form.Item name="field" />` will only bind control(Input/Select) which is the only children of it. Image this case, you add some text description after Input, then you have to wrap Input by a extra `<Form.Item name="field">`. `style` property of `Form.Item` could be useful to modify the nested form item layout, or `<Form.Item noStyle />` turn it into a pure form bind component(like `getFieldDecorator` in 3.x).
This demo shows how to use `Form.Item` with multiple controls. `<Form.Item name="field" />` will only bind the control(Input/Select) which is the only children of it. Imagine this case: you added some text description after the Input, then you have to wrap the Input by an extra `<Form.Item name="field">`. `style` property of `Form.Item` could be useful to modify the nested form item layout, or use `<Form.Item noStyle />` to turn it into a pure form-binded component(like `getFieldDecorator` in 3.x).
```diff
- <Form.Item label="Field" name="field">
@ -43,15 +43,15 @@ This demo show how to use `Form.Item` with multiple controls. `<Form.Item name="
+ </Form.Item>
```
This demo show three typical usages:
This demo shows three typical usages:
- `Username`: extra elements after control, using `<Form.Item name="field" noStyle />` inside `Form.Item` to bind Input.
- `Address`: two controls in one line, using two `<Form.Item name="field" noStyle />` to bind each control.
- `BirthDate`two controls in one line with independent error message, using two `<Form.Item name="field" noStyle />` to bind each control, make layout inline by customizing `style` property.
> Note, in this case, no more `name` property should be left in Form.Item with label.
> Note that, in this case, no more `name` property should be left in Form.Item with label.
See `Customized Form Controls` demo below for further advanced usage.
See the `Customized Form Controls` demo below for more advanced usage.
```jsx
import { Form, Input, Select, Tooltip, Button } from 'antd';