File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class PickerAndroidItem extends React.Component{
1515
1616 static propTypes = {
1717 value : PropTypes . any ,
18- label : PropTypes . string ,
18+ label : PropTypes . any
1919 }
2020
2121 constructor ( props , context ) {
@@ -94,6 +94,10 @@ export default class PickerAndroid extends React.Component{
9494 this . _onValueChange ( ) ;
9595 }
9696 }
97+ //cascade mode will reset the wheel position
98+ moveTo ( index ) {
99+ this . _moveTo ( index ) ;
100+ }
97101
98102 moveUp ( ) {
99103 this . _moveTo ( Math . max ( this . index - 1 , 0 ) ) ;
@@ -231,6 +235,7 @@ let ratio = PixelRatio.get();
231235let styles = StyleSheet . create ( {
232236
233237 container : {
238+ flex : 1 ,
234239 justifyContent : 'center' ,
235240 alignItems : 'center' ,
236241 //this is very important
@@ -256,6 +261,7 @@ let styles = StyleSheet.create({
256261 } ,
257262 middle : {
258263 height : 40 ,
264+ width : width ,
259265 overflow : 'hidden' ,
260266 borderColor : '#aaa' ,
261267 borderTopWidth : 1 / ratio ,
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-picker-android" ,
3- "version" : " 0.3.1 " ,
3+ "version" : " 0.3.2 " ,
44 "description" : " react-native-picker-android" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments