React Native Multi Select
you know select2 on web ? now you have it in react native at your command :)
Demo
Installation
npm i -S react-native-multi-select
Example
LocationDropDown.js
;;; static propTypes = {}; cities = 'Babolsar' 'Sari' 'Babol' 'Qaemshahr' 'Gorgan' 'Tehran' 'ali abad' 'gonbad' 'mashhad' 'esfehan' 'shiraz' 'kerman' 'ilam' 'sanandaj' 'mahshahr' 'behshar' 'tonekabon' ; state = selectedItem: text: "" displayOptionList: false ; { this; }; { this }; { this; }; { return <Select style=stylesselect> <SelectTextBox selectedItem=thisstateselectedItem placeholder="شهر خود را انتخاب کنید." onPressOut= this onTextInputFocus= this onTextInputLoosFocus= this onSelectTextBoxChanged= this /> <OptionList text=thisstatetext items=thiscities display=thisstatedisplayOptionList onAnItemSelected= this removeItem= this> thiscities </OptionList> </Select> ; } const styles = StyleSheet;
index.android.js
;;; { return <View style= flex: 1 justifyContent: 'center' alignItems: 'center' > <LocationDropDown/> </View> ; } const styles = StyleSheet; AppRegistry;