ant design form表单动态增减表单项Form.List选中Select值后更新相关联Select选项
ant design form表单动态增减表单项Form.List选中Select值后更新相关联Select选项。代码中地市联动获取区县数据:
<Form name="dynamic_form_nest_item" onFinish={onFinish} autoComplete="off" form={form} initialValues={{ list: [{}] }} >
{(fields, { add, remove }) => (
{fields.map(({ key, name, ...restField }, index) => (
{() => (
)}
<Col span={1} style={{ textAlign: 'center' }}>
remove(name)} />
))}
)}
<Form.Item style={{ textAlign: 'center' }}>