反应本机自定义自动完成onblur fires在OnPress之前
我有一个textInput
具有列表itoment的组件,该组件显示下面的搜索建议列表,类似于自动完成。问题是当我单击列表中的建议之一时,它首先触发onblur
textInput
和的方法,然后需要第二次按发射OnPress
方法。如何一次点击调用OnPress方法?如果我按下下拉列表项目,我不希望它模糊。
I have a TextInput
component with a List Item component that displays a list of search suggestions below it, similar to an AutoComplete. The issue is when I click one of the suggestions from the list it first fires the onBlur
method of the TextInput
and requires a second press before it fires the onPress
method. How do I call the onPress method in one tap? I don't want it to blur if I'm pressing a dropdown list item.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在页。
将
键盘插入式图添加到
flatlistProps
中。A solution to this has been provided on the library's issues page.
Add the
keyboardShouldPersistTaps
prop toflatListProps
.