Skip to content

Commit

Permalink
type: onChange callback should define 'option' as Option | Option[] |…
Browse files Browse the repository at this point in the history
… undefined (#1090)
  • Loading branch information
thinkasany authored Nov 27, 2024
1 parent ec182e5 commit 35546c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export interface SelectProps<ValueType = any, OptionType extends BaseOptionType
value?: ValueType | null;
defaultValue?: ValueType | null;
maxCount?: number;
onChange?: (value: ValueType, option: OptionType | OptionType[]) => void;
onChange?: (value: ValueType, option?: OptionType | OptionType[]) => void;
}

function isRawValue(value: DraftValueType): value is RawValueType {
Expand Down

0 comments on commit 35546c0

Please sign in to comment.