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

How can i restrict places search to a specific country like "US"? #370

Open
munibahina opened this issue Jun 9, 2021 · 3 comments
Open

Comments

@munibahina
Copy link

Do you want to request a feature or report a bug?

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

Which versions of ReactPlacesAutocomplete, and which browser / OS are affected by this issue?

@faraz-dd
Copy link

faraz-dd commented Dec 7, 2021

This should work

<PlacesAutocomplete
  searchOptions={{
    componentRestrictions: {
       country: 'US'
    }
  }}
/>

@SasiKumar-Ramesh
Copy link

@munibahina They have already provided a workaround for this.
You can check this closed issue

@anbturki
Copy link

anbturki commented Jan 18, 2022

This should work

<PlacesAutocomplete
  searchOptions={{
    componentRestrictions: {
       country: 'US'
    }
  }}
/>

@munibahina This should solve the issue, i would encourage you to close the issue.

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

No branches or pull requests

4 participants