阵营天然 - IOS - React-Native(0.53.0) - React-Native-Elements(“^。19.0”)
当用户选择搜索栏时,我无法在我的React-Native-Element搜索栏旁边显示“取消”按钮。图像提供了我想要实现的目标
这是我的代码段:
<SearchBar
lightTheme round
placeholder="Test"
onSubmitEditing={()=>{this.doSomething()}}
cancelButtonText = "Cancel"
/>
React-Native-Element搜索栏的参考 https://react-native-training.github.io/react-native-elements/docs/searchbar.html
答案 0 :(得分:4)
最新稳定版本和测试版的docs
不同。
如果你有 beta版本,你可以在cancelButtonTitle
<SearchBar
showLoading
platform="ios"
cancelButtonTitle="Cancel"
placeholder='Search' />