import { Form } from 'antd'; import { useForm } from 'antd/lib/form/Form'; import { useEffect } from 'react'; import BindDataItem from './BindDataItem'; export interface BindDataFromProps { value?: any; onChange?: (value: any) => void; flagList?: any[]; isHaveDate?: boolean; isHaveDay?: boolean; isHaveCheckBox?: boolean; activeKey?: any; disabledIds?: string[]; isAllowApply?: boolean; setActiveKey?: (val: string[]) => void; selectMap?: any; getSelectOptions?: (id: number) => void; appId?: number; customRender?: (name: React.ReactNode, item: any) => React.ReactNode; checkInterceptor?: (checked: any, info: any) => Promise; isOtherUser?: boolean; fixedIds?: string[]; disabled?: boolean; showAllSelect?: boolean; } const BindDataFrom = (props: BindDataFromProps) => { const { value, onChange, flagList, disabledIds, isAllowApply = false, isHaveDate, isHaveDay, activeKey, isHaveCheckBox = false, setActiveKey, selectMap, getSelectOptions, appId, customRender, checkInterceptor, isOtherUser, fixedIds, disabled, showAllSelect, } = props; const [form] = useForm(); useEffect(() => { form.setFieldsValue(value); }, [value, form]); return (
onChange?.(allValues)}> ); }; export default BindDataFrom;