
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
mkp-react-native-picker
Advanced tools
Cross platform picker for IOS and Android. It is based on PickerIOS for IOS while react-native-wheel for android.

$ npm i mkp-react-native-picker --save
// file: android/settings.gradle
...
include ':react-native-wheel'
project(':react-native-wheel').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wheel/android')
// file: android/app/build.gradle
...
dependencies {
...
compile project(':react-native-wheel')
}
// file: android/src/main/java/com.xx/MainApplication.java
...
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new WheelPackage() // Added there
);
}
};
import React ,{Component}from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity,
Platform
} from 'react-native';
import SinglePicker from 'mkp-react-native-picker';
const viewStyles = StyleSheet.create({
main: {
...Platform.select({
android: {
marginTop: 44
},
ios: {
marginTop: 64
}
}),
flex: 1,
backgroundColor: '#f5f5f5'
}
});
const options = [{
key: 1,
value: "Option1"
}, {
key: 2,
value: "Option2"
}, {
key: 3,
value: "Option3"
}];
export default class Picker extends Component {
constructor(props) {
super(props);
this.state = {
selected: ''
}
}
render() {
return <View style={viewStyles.main}>
<TouchableOpacity
style={{height:30,flexDirection:'row',justifyContent:'center',alignItems:'center',backgroundColor:'red'}}
onPress={()=>{
this.singlePicker.show();
}}>
<Text style={{fontSize:18,color:'white',fontWeight:'bold'}}>Single Picker(Click Me!)</Text>
</TouchableOpacity>
<View style={{height:50,justifyContent:'center'}}><Text>You have
selected {this.state.selected}</Text></View>
<SinglePicker
lang="en-US"
ref={ref=>this.singlePicker=ref}
onConfirm={(option)=>{
//this.setState({selected:option.value})
}}
onSelect={(option)=>{
this.setState({selected:option.value})
}}
options={options}
>
</SinglePicker>
</View>
}
}
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| options | array | yes | must be an array of key-value pairs,like {key:1,value:'option'} | |
| lang | string | no | 'zh-CN' | enums:'zh-CN','en-US',indicate the language of the text in buttons |
| style | object | no | {backgroundColor: "white"} | |
| defaultSelectedValue | any | no | key of each option,if undefined, the first option will be selected | |
| onConfirm | function | no | option that be selected as the parameter | |
| onSelect | function | no | option that be selected as the parameter | |
| onCancel | function | no |
| Name | Description |
|---|---|
| show | show the Picker |
| hide | hide the Picker |
FAQs
cross platform picker for Ios and Android
We found that mkp-react-native-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.