【发布时间】:2019-04-30 09:50:09
【问题描述】:
我有 reactjs Antd 表单,我想在 TextArea 中渲染 Tag 组件,类似于 Select 组件!
我尝试设置值
values.description = <Tag color="magenta">magenta</Tag>
this.props.form.setFieldsValue(values);
函数但它显示 [object Object] []2
<Form.Item label={<span>Description</span>}>
{getFieldDecorator('description', {
initialValue:''
})(
<TextArea maxLength={500} autosize={{ minRows: 4, maxRows: 4 }}
placeholder={'Description'} />
)}
</Form.Item>
我希望得到与 Select 组件 Antd Select Component 相同的结果 关于如何做到这一点的任何想法?
【问题讨论】:
-
我认为这与您想要的很接近。 stackoverflow.com/a/52406423/7727586
标签: javascript reactjs antd