OnSelect dosnt work with react-Google-places-autocomplete

Viewed 970

I build a form with react js and i want to include location with google-auto complete , so i found this library :

https://github.com/Tintef/react-google-places-autocomplete#readme

Its worked fine for me for 2 weeks but suddenly I see nothing while I print the value of OnSelect. at my console this message in yellow pops-up:

Select-073d29ba.esm.js:749 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

my Component:

<div>
    <GooglePlacesAutocomplete
      onSelect={console.log}
 />

Suggestion what happend?

1 Answers

I was facing the same issue, the problem is that the latest version of react-google-places-autocomplete is still in ALPHA and BETA Testing and it is not a stable one.

Just use the version 2.3.2, it will solve the issue.

run the command :

npm install --save react-google-places-autocomplete@2.3.2

Related