react-native-picker-select
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "react-native-picker-select", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": | ||
@@ -13,3 +13,12 @@ "A Picker component for React Native which emulates the native <select> interfaces for each platform", | ||
"main": "src/index.js", | ||
"keywords": ["dropdown", "picker", "select", "react", "react-native"], | ||
"keywords": [ | ||
"dropdown", | ||
"picker", | ||
"select", | ||
"react", | ||
"react-native", | ||
"react native", | ||
"expo", | ||
"items" | ||
], | ||
"files": ["LICENSE", "README.md", "src/index.js"], | ||
@@ -16,0 +25,0 @@ "dependencies": { |
@@ -39,3 +39,3 @@ # react-native-picker-select | ||
| onValueChange | function | Callback which returns `value, index` | Y | Both | | ||
| items | array | _ The items for the component to render. Each item should be in the following format:<br>`{label: 'Orange',value: 'orange',key: 'orange'}`<br>_ The label and the value are required, but the key will be based upon the label if it isn't included<br>\* The value can be any data type | Y | Both | | ||
| items | array | _ The items for the component to render. Each item should be in the following format:<br>`{label: 'Orange',value: 'orange',key: 'orange', color: 'orange'}`<br>_ The label and the value are required, but the key will be based upon the label if it isn't included<br>\* The value can be any data type. The color is optional. | Y | Both | | ||
| placeholder | object | _ An override for the default placeholder object with a label of `Select an item...` and a value of `null`<br>_ An empty object can be used if you'd like to disable the placeholder entirely | N | Both | | ||
@@ -42,0 +42,0 @@ | disabled | boolean | Disables interaction with the component | N | Both | |
@@ -7,2 +7,3 @@ import React, { PureComponent } from 'react'; | ||
StyleSheet, | ||
ColorPropType, | ||
Text, | ||
@@ -112,3 +113,8 @@ TextInput, | ||
return ( | ||
<Picker.Item label={item.label} value={item.value} key={item.key || item.label} /> | ||
<Picker.Item | ||
label={item.label} | ||
value={item.value} | ||
key={item.key || item.label} | ||
color={item.color} | ||
/> | ||
); | ||
@@ -231,2 +237,3 @@ }); | ||
animationType={this.state.animationType} | ||
supportedOrientations={['portrait', 'landscape']} | ||
> | ||
@@ -306,2 +313,3 @@ <TouchableOpacity | ||
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
color: ColorPropType, | ||
}) | ||
@@ -308,0 +316,0 @@ ).isRequired, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22776
385