diff --git a/src/Select.tsx b/src/Select.tsx index 14861395e..93aaf213f 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -91,6 +91,10 @@ export interface DefaultOptionType extends BaseOptionType { children?: Omit[]; } +export type SelectHandler = + | ((value: RawValueType | LabelInValueType, option: OptionType) => void) + | ((value: ValueType, option: OptionType) => void); + export interface SelectProps extends BaseSelectPropsWithoutPrivate { prefixCls?: string; @@ -109,8 +113,8 @@ export interface SelectProps>> Select - onSelect?: (value: RawValueType | LabelInValueType, option: OptionType) => void; - onDeselect?: (value: RawValueType | LabelInValueType, option: OptionType) => void; + onSelect?: SelectHandler; + onDeselect?: SelectHandler; // >>> Options /**