question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No Location autocomplete when entering location in text input

See original GitHub issue

Describe the problem

I’m using the library like so:

 <GooglePlacesAutocomplete
      placeholder='Search'
      onPress={(data, details = null) => {
        // 'details' is provided when fetchDetails = true
        console.log(data, details);
      }}
      query={{
        key: 'myapikey',
        language: 'en',
      }}
    />

But when I enter any address into the component’s input field, I see no autocomplete suggestions.

Reproduction

<View>
 <GooglePlacesAutocomplete
      placeholder='Search'
      onPress={(data, details = null) => {
        // 'details' is provided when fetchDetails = true
        console.log(data, details);
      }}
      query={{
        key: 'myapikey',
        language: 'en',
      }}
    />
</View>

Additional context

  • Library Version: 1.4.2
  • React Native Version: [e.g. 0.63.2]

If you are using expo please indicate here:

I’m not using expo

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

3reactions
zendevilcommented, Mar 2, 2021

@bell-steven It works after taking it out of the View! Thanks very much!

0reactions
zendevilcommented, Mar 2, 2021

@bell-steven It’s within a View

Read more comments on GitHub >

github_iconTop Results From Across the Web

Place Autocomplete | Places API - Google Developers
Note: You can use Place Autocomplete even without a map. If you do show a map, it must be a Google map. When...
Read more >
bind google places autocomplete on textbox without ...
I'm having a problem with binding my search textbox with Autocomplete without the use of instantiating a google map. What I'm trying to...
Read more >
Add Google Places Autocomplete To An Input Field - YouTube
By the end of this video, you'll be able to enable/add Google Places Autocomplete functionality to an input field that will show the ......
Read more >
Places Autocomplete - prevent form submission when ...
I have an autocomplete text field tied to an 'advanced search' form. ... the enter key on the form, but it also happens...
Read more >
Google Places API → Add Autocomplete To An Input Field
This is very useful when a user denies sharing his or her location accidentally or when the HTML Geolocation API does not support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found