Improve Select type definition

Close #8128
This commit is contained in:
Wei Zhu 2017-11-07 17:24:27 +08:00
parent b740d86bbf
commit e5a57ff60a

View File

@ -20,7 +20,7 @@ export interface AbstractSelectProps {
dropdownStyle?: React.CSSProperties;
dropdownMenuStyle?: React.CSSProperties;
onSearch?: (value: string) => any;
filterOption?: boolean | ((inputValue: string, option: Object) => any);
filterOption?: boolean | ((inputValue: string, option: React.ReactElement<OptionProps>) => any);
}
export interface LabeledValue {
@ -56,10 +56,11 @@ export interface OptionProps {
disabled?: boolean;
value?: any;
title?: string;
children?: React.ReactNode;
}
export interface OptGroupProps {
label?: string | React.ReactElement<any>;
label?: React.ReactNode;
}
export interface SelectContext {