UNPKG

@aliretail/react-materials-components

Version:
18 lines (17 loc) 776 B
/// <reference types="react" /> import { OptionsWithFormat } from '@ahooksjs/use-request/lib/types'; import { SelectProps } from '@alifd/next/types/select'; declare type actionTypeEnum = 'itemClick' | 'popupClose' | 'inputChange'; declare type RequestConfigProps = OptionsWithFormat<any, any, any, any> & { service: Record<string, any>; searchFormat?: (inputValue: string, actionType: actionTypeEnum) => Record<string, any>; }; interface HookSelectProps extends Omit<SelectProps, 'onSearch' | 'onSearchClear'> { /** * 当搜索框值变化时回调 */ onSearch?: (value: string, actionType: actionTypeEnum) => void; requestConfig: RequestConfigProps; } declare function HookSelect(props: HookSelectProps): JSX.Element; export default HookSelect;