react-google-autocomplete
react-google-autocomplete copied to clipboard
Not able to restrict the search suggestion to start after 3 characters.
Need to show suggestion after 3 characters. Currently shows suggestion after typing a single character.

- I am not able to find an atttrbute to provide minlength
- Also not able to find any event handlers to stop suggestion till some characters e.g: 3
- Please give some input to acheive this implementation
@ErrorPro Please review.
@santhoshspecbee Could you please try using debounce prop?
@andaden any example on how to use debounce, I use something like this but doesn't work
<Autocomplete
debounce='1000'
onPlaceSelected={(data) => {
this.handlePlaceChange(data);
}}
/>
You can use debounce with usePlacesAutocompleteService here is an example.
const {
placesService,
placePredictions,
getPlacePredictions,
isPlacePredictionsLoading
} = usePlacesService({
apiKey: process.env.REACT_APP_GOOGLE,
debounce: 1500
});
You can leave a message here suggesting what you would like to add to ErrorPro/react-google-autocomplete