import React, { FC } from 'react'; import { Cascader } from 'antd'; import { ALL_ADDRESS } from './address'; import type { DefaultOptionType } from 'antd/es/cascader'; interface Option { value: string; label: string; children?: Option[]; disabled?: boolean; } interface CascaderSearchProps { changeAddressKey: (a: string[], b: Option[]) => void; } const CascaderSearch: FC = (props) => { const onChange = (value: string[], selectedOptions: any[]) => { props.changeAddressKey(value, selectedOptions); }; const filter = (inputValue: string, path: DefaultOptionType[]) => path.some( (option) => (option.label as string) .toLowerCase() .indexOf(inputValue.toLowerCase()) > -1, ); return ( {}} /> ); }; export default CascaderSearch;