Skip to content

Commit

Permalink
adds missing argument in Select onChange prop (#9332)
Browse files Browse the repository at this point in the history
* adds missing argument in Select onChange prop

from the docs: 
`function(value, option:Option/Array<Option>)`

also, (from reality) the callback really does send an option or options array.

* updates type to use ReactElement instead of Object
  • Loading branch information
dimitropoulos authored and yesmeck committed Feb 13, 2018
1 parent 2a1612b commit c92cf5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/select/index.tsx
Expand Up @@ -38,8 +38,8 @@ export interface SelectProps extends AbstractSelectProps {
defaultValue?: SelectValue;
mode?: 'default' | 'multiple' | 'tags' | 'combobox';
optionLabelProp?: string;
onChange?: (value: SelectValue) => void;
onSelect?: (value: SelectValue, option: Object) => any;
onChange?: (value: SelectValue, option: React.ReactElement<any> | React.ReactElement<any>[]) => void;
onSelect?: (value: SelectValue, option: React.ReactElement<any>) => any;
onDeselect?: (value: SelectValue) => any;
onBlur?: () => any;
onFocus?: () => any;
Expand Down

0 comments on commit c92cf5b

Please sign in to comment.