有一个占位符用于反应本机选择器 [英] Have a placeholder for react native picker
本文介绍了有一个占位符用于反应本机选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在用户点击之前显示的反应本机选择器的占位符.这个想法是有一个选择器,上面写着国籍",一旦你点击并选择你的国家,它就会呈现这个国家.我想在选择器中没有国籍"作为可用选项的情况下执行此操作.
Is there a way to have a placeholder for the react native picker that is shown before the user clicks on it. The idea would be to have a picker that says "Nationality" and once you click and choose your country it renders the country. I want to do this without having "Nationality" as an available option in the picker.
推荐答案
Place a first child as <Picker.Item value='' label='Placeholder text...'/>
Place a first children as <Picker.Item value='' label='Placeholder text...' />
这篇关于有一个占位符用于反应本机选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文