Picker.Item
Picker.Item, for configuring the Picker's selectable options
Extends: TouchableOpacity
(meaning you can pass the super component's props as well).
(meaning you can pass the super component's props as well).
PROPS
| name | description | type | default |
|---|---|---|---|
| label | [DEPRECATED - please include the label in the value prop] The item label | string | |
| value | The item value with the following format - {value: ..., label: ...}, for custom shape use getItemLabel, getItemValue props | union | |
| getItemLabel | Function to return the label out of the item value prop when value is custom shaped. | func | |
| getItemValue | Function to return the value out of the item value prop when value is custom shaped. | func | |
| isSelected | Is the item selected | bool | |
| disabled | Is the item disabled | bool | |
| renderItem | Render custom item | func | |
| onPress | Callback for onPress action | func | |
| onSelectedLayout | Callback for onLayout event | func |
CODE SAMPLE
See example here.