Warning 'there are more than one `getFieldDecorator` in it.'
See original GitHub issueEnvironment(required)
- antd version:
- OS and its version:
- Browser and its version:
What did you do? Please provide steps to re-produce your problem.
I wont FormItem contain more than one component . this case always use. for excampels
<FormItem label='Age'>
{getFieldDecorator('Age', {rules: [{required: true, message: 'Age require' }]})(
<Input style={{ width: 100 }} size="small" />
)}
{getFieldDecorator('AgeUnit', {rules: [{required: true, message: 'AgeUnit require' }]})(
<Select allowClear size="small" style={{ width: 65 }}>
<Option value="year">year</Option>
<Option value="month">month</Option>
<Option value="day">day</Option>
</Select>
)}
</FormItem>
console waring `Form.Item` cannot generate `validateStatus` and `help` automatically, while there are more than one `getFieldDecorator` in it.
in this case,how can i do?
以后会支持这种场景吗,去除警告吗,这种场景经常使用,相关联的多个组件在一个formitem内输入。
<!-- e.g. I just imported Button from antd -->
#### What do you expected?
<!-- e.g. It works fine as official website -->
#### What happen?
<!-- e.g. Style is not as expected. (And it will be better to provide screenshot) -->
#### Re-producible online demo
<!-- Please fork http://codepen.io/benjycui/pen/KgPZrE?editors=001 to re-produce you issue -->
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Warning 'there are more than one `getFieldDecorator` in it.'
Warning 'there are more than one `getFieldDecorator` in it.' 问题: ant-design form 警告Warning 'there are more than one getFieldDecorator in it ...
Read more >Form - Ant Design
A form consists of one or more form fields whose type includes input, textarea, checkbox, radio, select, tag, and more. A form field...
Read more >Duplicate field names will result in both fields getting edited ...
When I use this.props.form.setFieldsValue to set ant-design form values, I got this warning, is there someone have seen this problem?
Read more >ant-design/ant-design-english
because function getFieldDecorator only have one props as your input parameter ,but there are more than one Input element in InputGroup, so it...
Read more >Form - Ant Design
An enterprise-class UI design language and React-based implementation with a set ... A form consists of one or more form fields whose type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
API 暂时不会变动。
虽然
FormItem
不能嵌入多个getFieldDecorator
。FormItem 自己还是可以互相嵌套的,你可以看下 https://ant.design/components/form-cn/#components-form-demo-validate-static 这个例子。This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.