简体   繁体   中英

How can I use DropDown List in Expo React-Native?

I have been facing a problem with react native and expo as I cannot find a dropdown list component for form input. How can I do that without ejecting from expo?

You should be able to use Picker module . They recommend using the React Native Community Picker package. You do not need to eject for it to work, you can just install it through NPM.

try this https://github.com/react-native-community/react-native-picker On others expo versions the picker from react has being depreciated so on this link you'll find different examples of drop down listings.

I tried many react-native and expo dropdowns. But the best one is react-native-material-dropdown-v2-fixed that I ever found. So I was thinking I should have to share with all you guys.

https://www.npmjs.com/package/react-native-material-dropdown-v2-fixed

Try ListItem from React Native Elements: https://reactnativeelements.com/docs/listitem

See ListItem.Accordion example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM