Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricting search to 2+ countries? #925

Open
1 task
allenwalker3 opened this issue Dec 15, 2023 · 1 comment
Open
1 task

Restricting search to 2+ countries? #925

allenwalker3 opened this issue Dec 15, 2023 · 1 comment
Labels

Comments

@allenwalker3
Copy link

Describe the problem

I want to limit the search to include both US and CA.

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

Click to expand!
<GooglePlacesAutocomplete
           placeholder='Enter Location'
           fetchDetails={true}
           onPress={(data, details) => {
             // 'details' is provided when fetchDetails = true
           }}
           query={{
             key: "MY_API_KEY",
             language: 'en'
             **//components: { country: ["us", "ca"] }  --> doesn't work**
             components: 'country:us',
           }}
    />
  
  

Additional context

  • Library Version: 2.5.6

  • React Native Version: 0.72.4

  • [x ] iOS

  • [x ] Android

  • Web

  • [x ] I am using expo

@lenkaborshch
Copy link

lenkaborshch commented Dec 27, 2023

You can use as below
components: 'country:us|country:ca'

But

Currently, you can use componentRestrictions to filter by up to 5 countries (from google)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants