[fix] Picker prop types

Fix #879
This commit is contained in:
Nicolas Gallagher
2018-03-29 15:11:16 -07:00
parent aa22b06359
commit 8e94d858b2

View File

@@ -23,7 +23,7 @@ import { arrayOf, bool, func, number, oneOfType, string } from 'prop-types';
const pickerStyleType = StyleSheetPropType(PickerStylePropTypes);
type Props = {
children?: Array<typeof PickerItem>,
children?: PickerItem | Array<typeof PickerItem>,
enabled?: boolean,
onValueChange?: Function,
selectedValue?: number | string,
@@ -37,7 +37,7 @@ type Props = {
class Picker extends Component<Props> {
static propTypes = {
children: arrayOf(PickerItemPropType),
children: oneOfType([PickerItemPropType, arrayOf(PickerItemPropType)]),
enabled: bool,
onValueChange: func,
selectedValue: oneOfType([number, string]),