gpt4 book ai didi

react-native - React Native [React Native Elements] 搜索栏 CancelButtonText

转载 作者:行者123 更新时间:2023-12-02 03:37:21 25 4
gpt4 key购买 nike

React-Native- IOS- React-Native (0.53.0)- React-Native-Elements(“^.19.0”)

当用户选择搜索栏时,我无法在 React-Native-Element 搜索栏旁边显示“取消”按钮。提供了我想要实现的目标的图像

Unable to see the 'CANCEL' text at any time

这是我的代码片段:

    <SearchBar
lightTheme round
placeholder="Test"
onSubmitEditing={()=>{this.doSomething()}}
cancelButtonText = "Cancel"
/>

enter image description here

React-Native-Element 搜索栏引用 https://react-native-training.github.io/react-native-elements/docs/searchbar.html

最佳答案

docs 最新稳定版本测试版本有所不同。

如果您有测试版,您可以添加 cancelButtonTitle支持您的SearchBar

<SearchBar
showLoading
platform="ios"
cancelButtonTitle="Cancel"
placeholder='Search' />

关于react-native - React Native [React Native Elements] 搜索栏 CancelButtonText,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49744352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com