Remove type union in PickeriOS/PickerNativeComponent
Summary: This builds on the last diff to remove type a type union from Picker. This diff focuses on Picker internals. Changelog: [JS] Remove type union in PickeriOS/PickerNativeComponent Reviewed By: sammy-SC Differential Revision: D24254615 fbshipit-source-id: f788a2e123135c1e8b9909870c40f53b2dea0227
This commit is contained in:
Родитель
b05d90e8bb
Коммит
3113e47b9b
|
@ -37,7 +37,7 @@ type PickerIOSChangeEvent = SyntheticEvent<
|
|||
|
||||
type RCTPickerIOSItemType = $ReadOnly<{|
|
||||
label: ?Label,
|
||||
value: ?(number | string),
|
||||
value: ?string,
|
||||
textColor: ?ProcessedColorValue,
|
||||
|}>;
|
||||
|
||||
|
@ -49,7 +49,7 @@ type Props = $ReadOnly<{|
|
|||
itemStyle?: ?TextStyleProp,
|
||||
onChange?: ?(event: PickerIOSChangeEvent) => mixed,
|
||||
onValueChange?: ?(itemValue: string | number, itemIndex: number) => mixed,
|
||||
selectedValue: ?(number | string),
|
||||
selectedValue: ?string,
|
||||
accessibilityLabel?: ?string,
|
||||
|}>;
|
||||
|
||||
|
@ -60,7 +60,7 @@ type State = {|
|
|||
|
||||
type ItemProps = $ReadOnly<{|
|
||||
label: ?Label,
|
||||
value?: ?(number | string),
|
||||
value?: ?string,
|
||||
color?: ?ColorValue,
|
||||
|}>;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ type PickerIOSChangeEvent = SyntheticEvent<
|
|||
|
||||
type RCTPickerIOSItemType = $ReadOnly<{|
|
||||
label: ?Label,
|
||||
value: ?(number | string),
|
||||
value: ?string,
|
||||
textColor: ?ProcessedColorValue,
|
||||
|}>;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче