Skip to content

fix: respect keyboardShouldPersistTaps in FlatList#993

Open
n-kulic wants to merge 1 commit intoFaridSafi:masterfrom
n-kulic:patch-1
Open

fix: respect keyboardShouldPersistTaps in FlatList#993
n-kulic wants to merge 1 commit intoFaridSafi:masterfrom
n-kulic:patch-1

Conversation

@n-kulic
Copy link

@n-kulic n-kulic commented Dec 8, 2025

onPress not called on first tap in GooglePlacesAutocomplete

What's the issue?

The internal FlatList never forwards keyboardShouldPersistTaps, so even if caller sets it to 'handled' or 'always', the first tap always closes the keyboard without firing onPress.

How to reproduce?

<GooglePlacesAutocomplete
    keyboardShouldPersistTaps="handled"
    placeholder="Keyboard Tap Test"
    query={{ key: GOOGLE_MAPS_API_KEY }}
/>

Type any query and tap a result -> keyboard hides, item is not selected until you tap again.

Proposed changes

Pass component's keyboardShouldPersistTaps prop to the FlatList:

<FlatList
  ...
  keyboardShouldPersistTaps={keyboardShouldPersistTaps}

Now the list respects the prop (defaults to 'always'), so first tap hits the row immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant