- Notifications
You must be signed in to change notification settings - Fork6
binbytes/react-native-simple-modal-picker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Easy to use and fully customized modal picker for both iOS and Android. Have same look and feel in both plateform.
$ npm install react-native-simple-modal-picker --save
| Prop | DataType | Description | IsRequired |
|---|---|---|---|
data | Array | Data in json format | true |
value | String | Name of field which you want tobe return on selection from array | true |
label | String | Name of field which you want tobe shown in list of selection | true |
onValueChange | function(value) | Will be called on item selection and get value as a argument | true |
renderRow | function(rowData) | Custom component for render row and get row data as a argument | false |
Here fullexample of package usage
<Pickerref={instance=>this.simplePicker=instance}data={this.data}label={'name'}value={'value'}onValueChange={(value)=>alert(value+' selected')}/>
<Pickerref={instance=>this.customRowPicker=instance}data={this.data}label={'name'}value={'value'}onValueChange={(value)=>alert(value+' selected')}renderRow={(rowData)=><Textstyle={styles.rowStyle}>{rowData.name}</Text>}/>
<View><Pickerref={instance=>this.dropDownPicker=instance}data={this.data}label={'name'}value={'value'}onValueChange={(value,selectedIndex)=>this.setState({selectedIndex})}/><Viewstyle={styles.subContainer}><TouchableOpacitystyle={styles.dropDownContainer}onPress={()=>this.dropDownPicker.setModalVisible(true)}><Textstyle={styles.dropDownText}>{this.data[this.state.selectedIndex].name}</Text></TouchableOpacity></View></View>
About
React Native modal picker for both Android and iOS
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.


