import React from 'react'; import { CloseOutlined } from '@ant-design/icons'; import { Button, Card, Form, Input, Space, Typography } from 'antd'; const App: React.FC = () => { const [form] = Form.useForm(); return (
{(fields, { add, remove }) => (
{fields.map((field) => ( { remove(field.name); }} /> } > {/* Nest Form.List */} {(subFields, subOpt) => (
{subFields.map((subField) => ( { subOpt.remove(subField.name); }} /> ))}
)}
))}
)}
{() => (
{JSON.stringify(form.getFieldsValue(), null, 2)}
)}
); }; export default App;