///
export declare type Select$Props = {
valueEqualityCheck?: (a: T, b: T) => boolean;
options: Select$Option[] | Select$OptionGroup[];
optionRenderer?: (props: any, option: boolean) => JSX.Element;
optionDecorationRenderer?: (props: any, option: boolean) => JSX.Element;
loading?: boolean;
} & CommonProps & OptionProps & AsyncProps & CreatableProps;
declare type CommonProps = {
altStyle?: boolean;
name?: string;
disabled?: boolean;
placeholder?: string;
searchable?: boolean;
error?: string;
info?: string;
label?: string;
selectOverrides?: any;
isValidNewOption?: (inputValue: string) => boolean;
actionButton?: {
text: string;
icon: string;
onClick: () => any;
};
};
declare type AsyncProps = {
async: true;
loadOptions: (input: string) => Promise<{
options: Select$Option[];
}>;
} | {
async?: false;
loadOptions?: undefined;
};
declare type CreatableProps = {
creatable?: boolean;
};
declare type OptionProps = {
multi: true;
clearable?: boolean;
onChange: (option: Select$Option[]) => any;
value: Select$Option[] | T[];
} | {
multi?: false;
clearable: true;
onChange: (option: Select$Option | null) => any;
value: Select$Option | T | null;
} | {
multi?: false;
clearable?: false;
onChange: (option: Select$Option) => any;
value: Select$Option | T;
};
export declare type Select$OptionGroup = {
label: string;
tooltipText?: string;
options: Select$Option[];
} | Select$ActionButton;
export declare type Select$Option = {
value: T;
label: string;
newOption?: boolean;
valid?: boolean;
disabled?: boolean;
};
export declare type Select$ActionButton = {
text: string;
icon: string;
onClick: () => any;
__isActionButton__: boolean;
value: '';
label: '';
options: [];
};
export {};