import React, { useState } from 'react'; import { DownOutlined } from '@ant-design/icons'; import { Button, Col, Form, Input, Row, Select, Space, theme } from 'antd'; const { Option } = Select; const AdvancedSearchForm = () => { const { token } = theme.useToken(); const [form] = Form.useForm(); const [expand, setExpand] = useState(false); const formStyle: React.CSSProperties = { maxWidth: 'none', background: token.colorFillAlter, borderRadius: token.borderRadiusLG, padding: 24, }; const getFields = () => { const count = expand ? 10 : 6; const children = []; for (let i = 0; i < count; i++) { children.push( {i % 3 !== 1 ? ( ) : ( )} , ); } return children; }; const onFinish = (values: any) => { console.log('Received values of form: ', values); }; return (
{getFields()}
{ setExpand(!expand); }} > Collapse
); }; const App: React.FC = () => { const { token } = theme.useToken(); const listStyle: React.CSSProperties = { lineHeight: '200px', textAlign: 'center', background: token.colorFillAlter, borderRadius: token.borderRadiusLG, marginTop: 16, }; return ( <>
Search Result List
); }; export default App;