Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Omer Eldar
    @eldaromer
    Hey, I wanted to know if there was any way to pass in the api key through the react component rather than loading it as a script
    Would make my life a lot easier as we use one key for dev and one key for prod which is limited to our production url
    afiliptsov
    @afiliptsov

    Hey everyone. I saw that after passing out location from DropDown and Submitting it. In Console ( Network ) you are getting response with "formatted_address".
    Does anyone knows how to access this response and store it in the project?
    The idea is that when user types data. It store lat lng and stores address + zip code.

    handleSelect = address => {
        geocodeByAddress(address)
          .then(results => getLatLng(results[0]))
          .then(latLng => console.log("Success", latLng))
          .then(() => this.setState({ storedAddress: address }))
          .catch(error => console.error("Error", error));
      };

    But in the example about storedAddress will not return formatted address. Meaning it will not contain zip.

    Sakul Budhathoki
    @sakul-budhathoki
    searchOptions = {{ types :['cities']}} not working , throws Invalid request from Google maps api, what might be a problem here.
    Max Chernin
    @maxchernin
    hi guys
    how are you handling vaidation for this?
    Max Chernin
    @maxchernin
    hello all
    is there a way to clear all suggestion when i get "zero results" error?
    Aymen Fezai
    @aymensmurf_gitlab
    Hi,
    How to reverse geocoding? I mean how to get the name of the place from the lng and lat
    Nikola Mitic
    @nmitic

    Hey Humans! First ever gitter room for me, glad to find you here!

    Is there any example where react-places-autocomplete is used with react-final-form? And does it even make sense to use those two?

    Andrei Fiodorov
    @calepsol
    Hello all
    I have a question. Im adding in searchOptions = { fields: ['photos','formatted_address','name','rating','opening_hours','geometry'] }
    but not return photo_reference
    Volodymyr Kotuslyi
    @casufi
    Hello.
    I want to add sessionToken support for getPlacePredictions
    Dj Steinmetz
    @djsteinmetz
    @afiliptsov Had the same issue! For that, I just re-ran the geocodeByAddress(address) function, and instead of running the method getLatLng(), I simply set state at that point (in the second instance of the function).
    handleSelect = address => {
            geocodeByAddress(address)
                .then(results => getLatLng(results[0]))
                .then(latLng => {
                    console.log('Success', latLng)
                    console.log(address)
                    this.setState({
                        latLng: latLng,
                        // address: address
                    });
                })
                .catch(error => console.error('Error', error));
            geocodeByAddress(address)
                .then(results => this.setState({address: results[0].formatted_address}))
                .catch(error => console.error('Error', error));
        };
    seanyu4296
    @seanyu4296
    just wondering is anyone here using typescript
    i think the types are outdated
    sanj123456
    @sanj123456
    Hi
    Can i restrict by country a code
    sanj123456
    @sanj123456
    ???
    Brian Simmons
    @Bentopi
    Does anybody have a good reference for testing the places-autocomplete component with enzyme?
    Marco Arduini
    @nerfologist

    Hi, I'm also testing an application which uses react-places-autocomplete with cypress.

    The test is able to search for a city and select one of the results and it works fine in local, since it hits the real google geolocation service.

    Unfortunately, it does not work in CI because it's prevented from sending requests to external services. I have been trying to stub the request for some time with little success. Any suggestions?

    vidur singla
    @vidur149
    Hey
    Guys can someone help me to clear autocomplete api
    Vamsi
    @vamsi1317

    Hi,

    Can anyone suggest how to integrate the react-places-autocomplete with react select?

    mkarimv
    @mkarimv
    Hi, i need some help
    Screenshot 2019-06-11 at 18.52.38.png
    gb9box
    @gb9box
    Hi all!
    I’ve got an error when test with Jest after using this package.
    ...
    TypeError: request.open is not a function
        at dispatchXhrRequest (.../node_modules/axios/lib/adapters/xhr.js:28:13)
        at new Promise (<anonymous>)
        at xhrAdapter (.../node_modules/axios/lib/adapters/xhr.js:11:10)
        at dispatchRequest (.../node_modules/axios/lib/core/dispatchRequest.js:59:10)
        at <anonymous>
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! my-project@0.1.0 test: `node scripts/test.js --env=jsdom`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the my-project@0.1.0 test script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    Jest testing was working well before using this package.
    I need help to fix this issue ASAP
    HonestDev
    @HonestDev
    Hi all!
    how can i get the postal code of address?
    Dennis
    @jacquesporveau
    I've opened up a PR to add some missing test coverage: hibiken/react-places-autocomplete#283
    Kareem Khattab
    @kvreem
    is there a way to require an exact address?
    so more granular than city,state,country
    Anirudh Prasad
    @prasadanirudh
    im not gettting the true values in reponse while entering zipcode, like 10003. Any idea......
    image.png
    Above is the results im getting
    image.png
    while searching same on google map, it shows above results
    Abhi
    @abhigk
    Examples on github or npm
    are using css classes like className="autocomplete-dropdown-container"
    where is css file to use?
    Abhi
    @abhigk
    Is this a totally dead community?
    Javier Couce Langa
    @JCouce
    I hope it's not, the CSS files are not available you can design your own :(.
    I am trying to keep the results even when the input is not focused, anyone has an idea to do so?
    Javier Couce Langa
    @JCouce
    Solved:
    Just pass a reference prop:
    ref={(ref) => { if (!ref) return; ref.handleInputOnBlur = () => { }; }}
    Bhumi Sukhadiya
    @bhumi0901_gitlab
    searchOptions are not working in my case.
    I need name field also in selected address object
    but i am not able to get it.
    What is the issue?