import React, { FunctionComponent, useState, useCallback } from 'react'; import { Transfer as AntdTransfer } from 'antd'; import { IReactOption, IReactTransfer } from '@wowpic/xform-types'; const Transfer: FunctionComponent = ({ value, options = [], children, onChange, ...props }) => { const [selectedKeys, setSelectedKeys] = useState([]); const handleSelectChange = useCallback( (sourceSelectedKeys, targetSelectedKeys) => { setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys]); }, [] ); const dataSource = options.map((option: IReactOption) => ({ ...option, key: option.value })); return ( item.label} {...props}> {children} ); }; export default Transfer;