Skip to content

Commit

Permalink
Merge pull request #27 from lawnstarter/bug/landscape
Browse files Browse the repository at this point in the history
support landscape orientation
  • Loading branch information
lfkwtz authored Jun 5, 2018
2 parents 3370509 + 684d0ff commit dc72d72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-picker-select",
"version": "3.1.0",
"version": "3.1.1",
"description":
"A Picker component for React Native which emulates the native <select> interfaces for each platform",
"license": "MIT",
Expand All @@ -10,7 +10,16 @@
"url": "https://github.com/lawnstarter/react-native-picker-select.git"
},
"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"],
"dependencies": {
"lodash.isequal": "^4.5.0"
Expand Down
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ export default class RNPickerSelect extends PureComponent {
renderPickerItems() {
return this.state.items.map((item) => {
return (
<Picker.Item label={item.label} value={item.value} key={item.key || item.label} color={item.color} />
<Picker.Item
label={item.label}
value={item.value}
key={item.key || item.label}
color={item.color}
/>
);
});
}
Expand Down Expand Up @@ -227,6 +232,7 @@ export default class RNPickerSelect extends PureComponent {
visible={this.state.showPicker}
transparent
animationType={this.state.animationType}
supportedOrientations={['portrait', 'landscape']}
>
<TouchableOpacity
style={[styles.modalViewTop, this.props.style.modalViewTop]}
Expand Down Expand Up @@ -301,7 +307,7 @@ RNPickerSelect.propTypes = {
label: PropTypes.string.isRequired,
value: PropTypes.any.isRequired,
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
color: ColorPropType
color: ColorPropType,
})
).isRequired,
placeholder: PropTypes.shape({
Expand Down

0 comments on commit dc72d72

Please sign in to comment.