Skip to content

Commit 04946f5

Browse files
committed
issue#27
1 parent 743677c commit 04946f5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Needs react-native >= 0.14.2
2323

2424
####Props
2525
- <b>style</b> style of picker, you can set width and height of picker in this prop
26+
- <b>pickerElevation</b> elevation of picker (for issue https://github.com/beefe/react-native-picker/issues/27)
2627
- <b>pickerBtnText</b> string, tool bar's confirm btn text
2728
- <b>pickerCancelBtnText</b> string, tool bar's cancel ben text
2829
- <b>pickerBtnStyle</b> textStylePropType, tool bar's btn style

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default class PickerAny extends React.Component {
2525

2626
static propTypes = {
2727
style: PropTypes.any,
28+
pickerElevation: PropTypes.number,
2829
pickerBtnText: PropTypes.string,
2930
pickerCancelBtnText: PropTypes.string,
3031
pickerBtnStyle: PropTypes.any,
@@ -76,6 +77,7 @@ export default class PickerAny extends React.Component {
7677
//this.state.selectedValue may be the result of the first pickerWheel
7778
let {
7879
style,
80+
pickerElevation,
7981
pickerBtnText,
8082
pickerCancelBtnText,
8183
pickerBtnStyle,
@@ -124,6 +126,7 @@ export default class PickerAny extends React.Component {
124126
this.pickerStyle = pickerStyle;
125127
return {
126128
style,
129+
pickerElevation,
127130
pickerBtnText,
128131
pickerCancelBtnText,
129132
pickerBtnStyle,
@@ -442,6 +445,7 @@ export default class PickerAny extends React.Component {
442445

443446
return (
444447
<Animated.View style={[styles.picker, {
448+
elevation: this.state.pickerElevation,
445449
width: longSide,
446450
height: this.state.showMask ? height : this.state.style.height,
447451
bottom: this.state.slideAnim

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-picker",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "react-native-picker",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)