Two clicks needed to select the item from the list
See original GitHub issueHere is my component:
<Autocomplete
data={possibleAddresses}
inputContainerStyle={styles.inputElement}
style={styles.inputBox}
containerStyle={styles.autocompleteContainer}
placeholder="321 Acme St"
onChangeText={text => this.lookupAddressMatches(text)}
listStyle={styles.resultList}
renderItem={data => (
<TouchableOpacity
onPress={() => this.setAddress(data)}
>
<Text style={styles.resultListItem}>{data.formattedAddress}</Text>
</TouchableOpacity>
)}
/>
My problem is that in order to select an item from the list, they have to click twice on it (at least on Android, haven’t tried ios).
The first click blurs the input box and the second click triggers the onPress of the TouchableOpacity in my renderItem.
Is there a way to not have this behaviour and have the onPress callback triggered even if the field is not currently blurred?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
SPO lists NEW item: now need to click TWICE
since some days ago we started to need to click twice in the New button in lists, to add an item, after we've...
Read more >Checked List Box requires me to select an Item twice
I'm guessing this is Windows Forms. There should be a property on the CheckedListBox called Check on Click.
Read more >How To Choose One or Two Clicks - 4KCC
2 ) Near the top of the window, you will see a list of menus, e.g., File, Edit, View. Choose the TOOLS drop-down...
Read more >Select needs double click do return #22547 - mui/material-ui
The label is moved to the top if the Select is focused; When the list of options is closed focus is returned to...
Read more >Why does everything need to be clicked TWICE on mobile app?
E.g. to click a button I need to first select the button (grey border appears), then click the button a second later (action...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can use ScrollView with
keyboardShouldPersistTaps='always'. it worked!@abhisri2090 I couldn’t remember exactly, but you should try `keyboardShouldPersistTaps=‘always’ on ‘ScrollView’