如何使用 React 原生选择框 [英] How to use React native select box

查看:41
本文介绍了如何使用 React 原生选择框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 React Native 开发一个 IosApp.我需要一个表单元素,比如 HTML 中的选择框.有没有什么方法可以在 React Native Form 组件中实现相同的功能?

I was working on an IosApp using React Native. I need a form element like select box in HTML. Is there any ways to achieve the same in React Native Form components?

推荐答案

可能最接近你想要的 React Native 捆绑的东西是 http://facebook.github.io/react-native/docs/picker.html

Probably the closest to what you want that comes bundled with React Native is http://facebook.github.io/react-native/docs/picker.html

选择器组件将在 iOS 上为您提供不倒翁功能,在 Android 上为您提供下拉菜单

The Picker component will give you a tumbler thing on iOS and a dropdown on Android

或者,这个 3rd 方组件可能更接近您想要的:https://github.com/bulenttastan/react-native-list-popover

Alternatively maybe this 3rd party component is closer to what you want: https://github.com/bulenttastan/react-native-list-popover

人们一直在为 React Native 创建新组件,从它们中搜索的好地方是:https://react.parts/

People are creating new components for React Native all the time, a good place to search from them is: https://react.parts/

这篇关于如何使用 React 原生选择框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆