Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-wheel-picker-android

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-wheel-picker-android - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

src/assets/pickerAndroid.gif

2

package.json
{
"name": "react-native-wheel-picker-android",
"version": "2.0.1",
"version": "2.0.2",
"description": "Simple Wheel Picker for Android to use with react-native",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,3 +14,4 @@ # ReactNativeWheelPicker WIP V2

![](./src/assets/wheelPicker.gif)
![](./src/assets/pickerAndroid.gif)
![](./src/assets/pickerIos.gif)

@@ -27,39 +28,37 @@ # Usage

Text,
View
View,
Button
} from 'react-native';
const wheelPickerData = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday','Saturday'];
const wheelPickerData = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday'];
class MyPicker extends Component {
state = {
selectedItem: 0,
}
onItemSelected = selectedItem => {
this.setState({ selectedItem })
}
onPress = () => {
this.setState({ selectedItem: 3 })
}
render() {
return (
<View style={styles.container}>
<WheelPicker
onItemSelected={this.onItemSelected}
data={wheelPickerData}
style={styles.wheelPicker}/>
<Button title={'Select third element'} onPress={this.onPress}/>
<Text>Selected position: {this.state.selectedItem}</Text>
<WheelPicker
selectedItem={this.state.selectedItem}
data={wheelPickerData}
onItemSelected={this.onItemSelected}/>
</View>
);
}
onItemSelected(position){
// do something
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
},
wheelPicker: {
width: 200,
height: 150
}
});
module.exports = MyPicker;
module.exports = MyPickers;
```

@@ -66,0 +65,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc