adds missing argument in Select onChange prop (#9332)

* 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
This commit is contained in:
Dimitri Mitropoulos 2018-02-13 08:33:25 -05:00 committed by Wei Zhu
parent 2a1612b0c2
commit c92cf5b778

View File

@ -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;