React-native-google-places-autocomplete: Search result disappeared when close keyboard.

Created on 12 Jan 2021  路  11Comments  路  Source: FaridSafi/react-native-google-places-autocomplete

I put a header by using renderHeaderComponent, so due to it, I can't see search results on the small phone because they are behind a keyboard. When I close the keyboard, the result disappeared, so I can't select anything.
How can I keep the search result even if I close the keyboard?

question No reproduction

Most helpful comment

keepResultsAfterBlur is part of v2.3.0, which was just published.

All 11 comments

The same issue with me.

Describe the bug

While text input is focused (keyboard visible) - search results are visible. Once text input blurs (keyboard hides) - search results erases from screen.

Reproduction - (required - issue will be closed without this)

  • Provide custom renderRow function to GooglePlacesAutocomplete field.
  • Type request to the input.
  • See scrollable suggestion list.
  • Tap return (or done) button on Keyboard (iOS) to hide keyboard and blur the field.

    Expected result

  • Result list should be visible and user able to select an item

    Actual result

  • Result list hides as Keyboard hides

My look and feel

We want to provide custom large items
image

Would you be willing to put in a PR?

Facing same issue, pls resolve it

@rmn183 please do not spam the issues.
This is an open-source library. You are more than welcome to propose a solution and submit a PR.

Assuming we have similar issues,

keyboardShouldPersistTaps={'handled'} on my parent ScrollView did the trick

Edit: On second thought seems to be a different scenario, sorry!

Having the same issue in "react-native-google-places-autocomplete": "^2.2.0",

@rmn183 please do not spam the issues.
This is an open-source library. You are more than welcome to propose a solution and submit a PR.

Will look for it

Having the same issue in "react-native-google-places-autocomplete": "^2.2.0",

Hi, @vizFlux don't customize your rowDescription method, If you have!

Cloned that repo in order to make a fix, but looks like fix already exists. There is a new boolean prop keepResultsAfterBlur which should do the trick (I have the same solution in my app patch). But version from npm has no such property. Repo master version and version in npm the same - 2.2.0.

image

Will continue to use local patch, until that flag will appear in npm :)

Any news on this? I updated to the last version and keepResultsAfterBlur still doesn't do the trick

keepResultsAfterBlur is part of v2.3.0, which was just published.

Was this page helpful?
0 / 5 - 0 ratings