import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Form, Input } from 'antd'; const BeginDynamicOptions = () => { return ( { if (!names || names.length < 1) { return Promise.reject(new Error('At least 1 option')); } }, }, ]} > {(fields, { add, remove }, { errors }) => ( <> {fields.map((field, index) => ( {fields.length > 1 ? ( remove(field.name)} /> ) : null} ))} )} ); }; export default BeginDynamicOptions;