react-native-google-places-autocomplete
react-native-google-places-autocomplete copied to clipboard
Bug Report: v2.2.0 -> 2.5.7 triggers the `onChangeText` Input event after selecting a location
Describe the bug
I was working on updating the packages in my project but for some reason I noticed that upgrading this package causes my validation check to fail because of the onChangeText firing additional times when upgrading the package to v2.5.7 from 2.2.0
Reproduction - (required - issue will be closed without this)
You dont need the api key to test. Just test in its current state (v2.2.0) and then upgrade the package in the package.json to 2.5.7 https://snack.expo.dev/@kris_lau/maps-autocomplete?platform=ios
In v2.2.0 (and 2.5.1 from what I can tell) you should see this:
In v2.5.7 you should see the onChangeText fired after selecting the item from the list which sets the isLocationValid to false. v2.5.7 doesn't seem to work in the snack though, it crashes with the crypto.getRandomValues() not supported error and on my project using the same code as the snack causes a Maximum update depth exceeded error:
Additional context
-
Library Version: [2.2.0 & 2.57]
-
React Native Version: [0.76.6]
-
[x] iOS
-
[x] Android
-
[ ] Web
If you are using expo please indicate here:
- [x] I am using expo (bare workflow)
Add any other context about the problem here, screenshots etc