showing results for - "react native dropdown"
Leo
14 Oct 2018
1 <Picker
2        selectedValue={selectedValue}
3        style={{ height: 50, width: 150 }}
4        onValueChange={(itemValue, itemIndex) => setSelectedValue(itemValue)}
5      >
6        <Picker.Item label="Java" value="java" />
7        <Picker.Item label="JavaScript" value="js" />
8      </Picker>
Lena
24 Jan 2019
1// How to install
2npm install --save react-native-material-dropdown
3
4// How to use
5import React, { Component } from 'react';
6import { Dropdown } from 'react-native-material-dropdown';
7
8class Example extends Component {
9  render() {
10    let data = [
11      {      value'Banana',    },
12      {      value'Mango',    },
13      {      value'Pear',    }];
14    
15    return (      
16      <Dropdown        
17      label='Favorite Fruit'        
18      data={data}      
19  		/>    
20		);  
21	}
22}
Nico
01 Jun 2016
1import React, { Component } from "react";
2import { Picker, View, Text, StyleSheet } from "react-native";
3
4export default class CategoryScreen extends Component {
5  state = {
6    selectedcat: "",
7    category: [
8      {
9        itemName: "Samsung M20"
10      },
11      {
12        itemName: "Nokia"
13      },
14      {
15        itemName: "Apple"
16      },
17      {
18        itemName: "Samsung M23"
19      },
20      {
21        itemName: "Samsung M24"
22      },
23      {
24        itemName: "Samsung M25"
25      }
26    ]
27  };
28
29  async onValueChangeCat(value) {
30    this.setState({ selectedcat: value });
31  }
32
33  render() {
34    return (
35      <View style={styles.viewStyle}>
36        <View style={{ flex: 0.3 }}>
37          <Text style={styles.textStyle}>Categories</Text>
38        </View>
39        <View style={{ flex: 0.7, fontSize: 14 }}>
40          <Picker
41            itemStyle={styles.itemStyle}
42            mode="dropdown"
43            style={styles.pickerStyle}
44            selectedValue={this.state.selectedcat}
45            onValueChange={this.onValueChangeCat.bind(this)}
46          >
47            {this.state.category.map((item, index) => (
48              <Picker.Item
49                color="#0087F0"
50                label={item.itemName}
51                value={item.itemName}
52                index={index}
53              />
54            ))}
55          </Picker>
56        </View>
57      </View>
58    );
59  }
60}
61
62const styles = StyleSheet.create({
63  viewStyle: {
64    flex: 1,
65    alignSelf: "center",
66    flexDirection: "row",
67    width: "92%",
68    justifyContent: "space-between",
69    alignItems: "center"
70  },
71  itemStyle: {
72    fontSize: 10,
73    fontFamily: "Roboto-Regular",
74    color: "#007aff"
75  },
76  pickerStyle: {
77    width: "100%",
78    height: 40,
79    color: "#007aff",
80    fontSize: 14,
81    fontFamily: "Roboto-Regular"
82  },
83  textStyle: {
84    fontSize: 14,
85    fontFamily: "Roboto-Regular"
86  }
87});
88
Benjamin
27 Feb 2018
1// npm install react-native-select-dropdown
2// yarn add react-native-select-dropdown
3
4import SelectDropdown from 'react-native-select-dropdown'
5const countries = ["Egypt", "Canada", "Australia", "Ireland"]
6<SelectDropdown
7	data={countries}
8	onSelect={(selectedItem, index) => {
9		console.log(selectedItem, index)
10	}}
11	buttonTextAfterSelection={(selectedItem, index) => {
12		// text represented after item is selected
13		// if data array is an array of objects then return selectedItem.property to render after item is selected
14		return selectedItem
15	}}
16	rowTextForSelection={(item, index) => {
17		// text represented for each item in dropdown
18		// if data array is an array of objects then return item.property to represent item in dropdown
19		return item
20	}}
21/>
Cassandra
08 May 2016
1/**
2 * Sample React Native App
3 * https://github.com/facebook/react-native
4 * @flow
5 */
6
7import React, { Component } from "react";
8import { Platform, StyleSheet, Text, View, Alert, YellowBox} from "react-native";
9import { Menu, MenuProvider, MenuOptions, MenuOption, MenuTrigger} from "react-native-popup-menu";
10
11export default class HomeActivity extends Component {
12
13  constructor(props) {
14     super(props);
15     YellowBox.ignoreWarnings([
16      'Warning: isMounted(...) is deprecated', 'Module RCTImageLoader'
17    ]);
18   }
19
20  render() {
21    return (
22      <MenuProvider style={{ flexDirection: "column", padding: 30 }}>
23        <Menu onSelect={value => alert(`You Clicked : ${value}`)}>
24
25          <MenuTrigger  >
26          <Text style={styles.headerText}>DropDown Menu</Text>
27          </MenuTrigger  >
28
29          <MenuOptions>
30            <MenuOption value={"Login"}>
31              <Text style={styles.menuContent}>Login</Text>
32            </MenuOption>
33            <MenuOption value={"Register"}>
34              <Text style={styles.menuContent}>Register</Text>
35            </MenuOption>
36            <MenuOption value={"Download"}>
37              <Text style={styles.menuContent}>Download</Text>
38            </MenuOption>
39            <MenuOption value={"Logout"}>
40              <Text style={styles.menuContent}>Logout</Text>
41            </MenuOption>
42            <MenuOption value={3} disabled={true}>
43              <Text style={styles.menuContent}>Disabled Menu</Text>
44            </MenuOption>
45          </MenuOptions>
46
47        </Menu>
48      </MenuProvider>
49    );
50  }
51}
52
53const styles = StyleSheet.create({
54    headerText: {
55    fontSize: 20,
56    margin: 10,
57    fontWeight: "bold"
58  },
59  menuContent: {
60    color: "#000",
61    fontWeight: "bold",
62    padding: 2,
63    fontSize: 20
64  }
65});
queries leading to this page
drop down list in react nativedropdown popup react nativedrop down menu react nativereact native listview with dropdowndropdownpicker in react nativeselect list react nativedrop down list react nativenative dropdown menureact native element dropdown examplecreate dropdown in form react nativedropdown tree react nativedropdown reactnativeshould i use a native dropdown react native paper dropdown react componenthow to use native dropdown in reactjsdrop down list react nativereat native drop downrn pickerdropdown description react nativereact native elements selectdropdownreact native picker default valuedropdown in react native material dropdowndropdown manu react nativedropdownpicker react nativetype dropdown in react nativedropdown nativedropdown button in react nativereact native dropdown menureacat native dropdown optiondropdown in react nativereact native text input dropdowndropdown menu component react nativereact native dropdown picker react nativereact native dropdown optionsdropdownref react nativehow to add drop down menu in the header in react nativereact native select dropdown examplesreact native drop down sample codedropdown react native androiddropdown react native examplereact native how to make a dropdown listreactnative dropdownreact native selected dropdown dropdown for react nativedropdown in reactnativedrop down button in react nativedropdown react naivereact native dropdown pickerhow to set picker value in react nativedropdown to read react nativedropdownalert react nativedrop down tool for react nativehow to create dropdown in react nativemake a dropdwon list in react nativereact native pickerpicker input react nativereact native dropdownselect in react natievcreate dropdown in react nativereact native elements dropdown select simple dropdown in react nativereact native dropdown menu inputreact native dropdown menureact native dropdownreact nativr dropdownhow to create a dropdown in react nativereact native dropdown componentdropdown selector react nativereact native select dropdownreact native dropdown container dropdown react native elementshow to change an input field to dropdown for list react nativecreate custom dropdown react nativehow to show dropdown in react nativereact dropdownreact naive pickerreactnative doc dropdown using class componentreact native add image with dropdownreact native component for options dropdownandroid native dropdownreact native drop downtext input dropdown react nativereact native combo boxreact native options dropdownreact native picker value not changingdown drop react nativereact native dropdown optionselection in react nativedrop down menu react native ios and androiddrop down box react netivedropdown input in react nativereact native meterial dropdownreact native dropdown v2react native dropdown iosdropdownmenu list in react nativecreate dropdown react nativeselect box react nativereact native dropdown picke dropdownreact native dropdown informationreact native dropdopdownreact native dropdown menyandroid react native dropdown react native dropdown pickercompact picker in center react jsreact native textinput dropdownreact native dropdown popupreact native dropdown navigationhow to add drop down menu in react nativereact native select pickerreact native select dropdown examplereact native dropdownalert npmdropdown list react nativecustom dropdown in react nativedropdown container react nativedropdownlist react nativehow to use dropdown in react nativedropdown navigation bar react nativedropdonw menu react nativehow to create drop down menu in react nativehow to make dropdown react native modeldropdown listview react nativereact native iosdropdowndrop down input with react nativereact native dropdown with inputdropdown category in react nativedropdown web react nativereact native fropdowndrapdown react nativecustom drop down menu in react nativereact native drop down itemreact native dropdown menu customdrop down menu in react nativeflatlist onclick react nativereact native dropdown picker dropdown not open menureact native dropdown itemreactr native dropdownreact native community dropdownreact native web dropdownhow to create drop down list in react nativedropdown simple drop down item component for react nativereact native create custom dropdownsdropdown list for react nativematerial dropdown in react nativehow to create custom dropdown in react nativereact native dropdown buttonreact native paper dropdown get valuereact native picker onvaluechangereact native dropdowsreact animated dropdowndropdown animation react nativedropdown menu react nativeupdate the dropdown react nativehow to make custom dropdown in react nativereact native custom dropdown listreact native drop down menunpull down menu react nativereact native dropdown with data react native paper dropdowndropdown in react native class componentdropdown react native material dropdownpicker reacat nativehow to add drop down box in react nativedropdownpicker for react nativedropdown menu code in react nativepicker component react nativedropdown field in react nativedropdown picker react native exampleselect dropdown react nativepicker react nativedropdown item react nativereact native selectreactnative dropdown documentationcan 27t change value in picker react nativedropdown react native from scratchdropdown items from list react nativedropdown page react nativecomo fazer uma dropdown react nativedropdown box in react nativehow to make dropdown list in reatc nativemake dropdown in react native react native dropdown with serarchreact native dropdown for citydropdown component react nativedropdown react nativedropdown in react native exampleneed to implement react native dropdownreact native input dropdownreact native element dropdown examplereact native select boxreact native picker onchange attributereact native drop down infohtml native dropdowndropdown in react native elementsdropdown list in react nativereact native dropdowns with searchpicker component in reactr nativereact native dropdoencustom dropdown react nativedropdown react native elementreact native drop down searchreact native add item with dropdownclick to dropdown in react nativereact native drop down menureact native selecthow to make dropdown in react nativereact use native dropdownreact native dropdown menu examplecreate a dropdown in react nativeload dropdown react nativedropdown menu in react nativehow to selected picker showing in react native 3fselected dropdown react nativereact native pckerdropdown layout react nativereact native dropdownalerta native dropdownreact native flatlist dropdownreact native picker selected valuedropdown in native scripttreact native dropdowncustom drop down in react nativeinput dropdown react native examplereact native drop down listinstall react native dropdown pickerhow to create drop down in react nativedrop down in react nativedropdown picker react nativepicker in react nativereact native dropdown menu selectinput dropdown react nativehow to implement dropdown in react nativereact native dropdownsselect dropdown in react nativehow to use drop down in react nativedrop down in raect nativereact native dropdown librarydropdown reaact nativereact native model dropdownnative dropdownreact native dropdown listreact native ios dropdownreact native dropown componenta custom dropdown in react nativematerial dropdown react nativereact native multi level dropdowndropdown button menu in react native dropdown in react native paperreact native 3aselect dropdownhow to over dropdown view in react nativereact native dropdown sectionreact native dropdown materialdrop down listbox in react nativereact natiev dropdownreact native dropdown menusreact native dropdown pickreact native dropdown npmonvaluechange react native pickerreact native picker onchangereact native dropdonwinout dropdown react native examplereactnative doc dropdowncreate a customized dropdown element in react nativereact native dropdown meniumulti level dropdown in react nativereact native multi select dropdownreact native select dropdownreact native button with dropdownreact native create dropdownreat native dropdown menureact native elements drop downmenu dropdown react nativedrop down react nativereact native make dropdown menu in card component in the lis thow to make a dropdown in react nativedropdown ui in react nativeis it possible to use native dropdown in reactreact native dropdown selectchange datepicker react native colorreact navigation dropdown menu react nativepicker deprecated react nativewhen a dropdown is fouched in react nativedropdowns react nativereact native category dropdownmenuuse native select dropdownreact native elements dropdownhow to add drop down in react nativereact native dropdown calling codecreate drop down list in react nativedrop down for react nativereact pickerreact native pcikerhow to create drop down react nativedropdowns in react nativecombobox react nativereact native material dropdownhow to create a dropdown menu react nativereact native android dropdownreact native dropdown inputreact native picker on changedropdown select in react nativereact native dropdown list exampledropdown button react nativereact native pick listreact native elements dropdownreact native dropdownlistpicker react nativedropdown inside dropdown in react nativeopen dropdown menu react nativedropdown website react nativereact native simple dropdowninput with dropdown react nativehow to make dropdown in reactnativeopen dropdown over other components in react native using react native dropdown pickerdropdown in react nativedrop down in element react nativereact native droptdownreact native dropdown npmmake native dropdowndropdown description react nativedreact native drop down listhow to create dropdown component in react nativedropdown menu in forms react nativereact native button drop downreact native dropdowndropdown react native dropdownboxdropdown input react nativereact native trxt box with drop downdropdown react nativereact native dropdownbuttoninput type selece in react nativereact native dropdown pickerreact native dropdown menu tutorialhow to use drop down menu in react nativenative dropdown htmldropdown menus react nativereusable dropdown reactreact native dropdown selectorcreate custom dropdown in react nativehow to implement dropdown in react native exampledrop down option react nativeneed dropdown menu with react nativereact native dropdown examplereact native select dorpdowncustom drop down react nativedropdownlist in react nativereact nattive drop downnativebase picker list onvaluechangereact native elements dropdown menuselect options react nativecustom made react native dropdown listinpit dropdown react nativereact native input with dropdownreact native selecternpm react native dropdown with searchdropdown in nativebasereact native dropdown itemreact native picker value objectreact native dropdown simpledropdown view react nativedropdown tab bar react nativereact dropdown select for react nativerecat native dropdowndropdown menu for react nativereact nativce drop down react native dropdown faqdropdown in react native impleme tdifferent type of picker in react nativebest way to make a dropdown in react nativeopen a drop down in react nativehow to make your own drop down react nativereact native dropdown fieldbuild dropdown menu reactnativereact native category dropdown menudropdown ract nativepicker change event react nativedropdown component in react nativemake dropdown in react nativereact native react native element dropdown dropdown option in react nativedropdown raect nativedrop dwon menu react nativereact native menu dropdownreact native dropdown and displayreact native dropdowtextinput dropdown react nativereact native comboboxhow to make drop down in react nativereact native dropdown listselectbox react nativemake a drop down in react nativereactnative pickerdropdown react native eledocumentation react native input dropdownselector react nativedropdown select react nativedrop down select react nativedropup react nativehow to make drop down componentn in react nativepicker in react native examplereact native dropdown examplenative base dropdowndropdown menu react native exporeact native picker won 27t stay on selected valuedropdown panel react nativedrop down number for react nativerect native dropdown buttondropdown box react nativereact native material dropdown react nativereact native native dropdownreact native pickerreact native dropdown animnationreact native drop down liostreact native dropdown