Skip to content

A React Native Picker that mimics Android's implementation in iOS without changing the original API

License

Notifications You must be signed in to change notification settings

terryttsai/react-native-picker-modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-picker-modal

A React Native Picker that mimics Android's implementation in iOS without changing the original API. It uses React Native's Picker on Android and Text that shows the Picker inside a Modal on iOS.

Install

npm i react-native-picker-modal --save
// OR
yarn add react-native-picker-modal

Usage

It receives and passes along the same props and children that the react-native Picker receives.

import PickerModal from 'react-native-picker-modal';
import { Picker } from 'react-native';

// ...

<PickerModal
  selectedValue={this.state.language}
  onValueChange={(itemValue, itemIndex) => this.setState({language: itemValue})}>
  <Picker.Item label="Java" value="java" />
  <Picker.Item label="JavaScript" value="js" />
</PickerModal>

About

A React Native Picker that mimics Android's implementation in iOS without changing the original API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published