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
  • Loading branch information
thinkasany committed Nov 27, 2024
1 parent ec182e5 commit fb0dc7e
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 fb0dc7e

Please sign in to comment.