React Native have to double click for onPress to work
I actually just figured this out. I added the keyboardShouldPersistTaps='always' prop to my List, in addition to the Content tag:
<Content keyboardShouldPersistTaps='always' keyboardDismissMode='on-drag'>
<List>
<ListItem style={styles.inspectionsItemDivider} itemDivider>
<TextInput
autoFocus={true}
ref={(input) => { this.titleSearch = input }}
placeholder='Start typing...'
multiline={true}
onChangeText={this.setSearchText.bind(this)}
value={this.getSearchValue()}/>
</ListItem>
<View style={styles.searchContainer}>
<Text style={styles.recentText}>Recommended Descriptions</Text>
<List keyboardShouldPersistTaps='always' dataArray={this.state.searchedDescriptions}
renderRow={(description) =>
<ListItem button onPress={() => this.setInformationDescription(description)}>
<Text>{description}</Text>
</ListItem>
</List>
</View>
</List>
</Content>
For new googlers, in my case, I had a flatlist with an onPress property, and a searchBar. I wanted to press the row even when the keyboard is up, and I could do it only by double tap.Finally the problem was tackled by using "keyboardShouldPersistTaps" of the flatlist:
Hide_Soft_Keyboard=()=>{
Keyboard.dismiss();
}
....
<List>
<FlatList
keyboardShouldPersistTaps = "always"
...
renderItem={({item}) => (
<ListItem
...
...
onPress={() =>{this.Hide_Soft_Keyboard(); this.props.navigation.navigate('Screen2')}}
/> ) }
/>
</List>