UNPKG

chakra-ui-select

Version:
26 lines (25 loc) 1.14 kB
import { SelectMultipleProps } from './select-multiple'; import { DownshiftProps } from 'downshift'; import { FormControlOptions } from '@chakra-ui/form-control'; interface Option { value: string; label: string; } interface FilterOptionArgs<Item> { items: Item[]; selectedItems: Item[]; getOptionLabel: (item: Item | null) => string; inputValue: string | null; } export declare type SelectMutipleWrapperProps<Item> = FormControlOptions & Pick<SelectMultipleProps<Item>, 'value' | 'onChange' | 'defaultValue'> & { options: Item[]; label?: string; placeholder?: string; isSearchable?: boolean; noOptionsMessage?(inputValue: string | null): string | null; getOptionLabel?: DownshiftProps<Item>['itemToString']; getOptionKey?: (item: Item) => string; filterOption?(args: FilterOptionArgs<Item>): Item[]; }; export declare function SelectMultipleWrapper<Item = Option>({ options, getOptionLabel, getOptionKey, filterOption, placeholder, isSearchable, value, onChange, isDisabled, label, noOptionsMessage }: SelectMutipleWrapperProps<Item>): JSX.Element; export {};