From e5a57ff60a54232f560da71e2023cffa4b5ed35f Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Tue, 7 Nov 2017 17:24:27 +0800 Subject: [PATCH] Improve Select type definition Close #8128 --- components/select/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/select/index.tsx b/components/select/index.tsx index 0653c6017f..9d78f9d394 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -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) => 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; + label?: React.ReactNode; } export interface SelectContext {