react-google-autocomplete icon indicating copy to clipboard operation
react-google-autocomplete copied to clipboard

Future changes and things you'd change or add.

Open ErrorPro opened this issue 8 years ago • 19 comments

Hi. Here is a list of changes we are going to make eventually. Feel free to comment on anything you have in your mind.

  1. ~~Passing a config object as a props to the component(@chexxor).~~ https://github.com/ErrorPro/react-google-autocomplete/issues/12 Done in v2.0.0
  2. ~~Remove event listeners from the component when it gets unmounted .~~ Done.
  3. ~~Try to add google place service itself. As separated export.~~ Done

ErrorPro avatar Feb 12 '17 20:02 ErrorPro

Thanks for maintaining! That one is still on my to-do list. I've got other, higher priority things right now, though. :(

chexxor avatar Feb 12 '17 20:02 chexxor

Adding à value field which can be changed (i mean giving the possibility to manually set the value of the component)

yamakhalah avatar Oct 30 '19 23:10 yamakhalah

I've been trying to implement enter press in the search field to select the first result if there is one, but I have not been able to achieve it.

wjoeyu avatar Jan 09 '20 16:01 wjoeyu

@ErrorPro Can we please add debouncing capabilities here?

fabrianibrahim avatar May 28 '20 06:05 fabrianibrahim

Not sure if adding the onChange event listener would be feasible? Would help tremendously with manual input and client side form validation

francoro93 avatar Jun 17 '20 17:06 francoro93

Is it possible to add type definitions to avoid adding declare module 'react-google-autocomplete' to declaration file in Typescript projects?

rkyslyy avatar Jun 24 '20 13:06 rkyslyy

Debouncing with ms as prop would be great. Can i make a PR for this feature?

KoderMAL avatar Dec 17 '20 20:12 KoderMAL

@KoderMAL Please! Feel free to submit your PR and we can merge it

ErrorPro avatar Apr 20 '21 15:04 ErrorPro

@rkyslyy Added TS annotations in v2 but thinking on rewriting the whole lib with TS later, also added TS info in the readme, please have a look!

ErrorPro avatar Apr 20 '21 15:04 ErrorPro

Hey! I just published a new version(v2.1.0) which has denounce in it. Check it out and let me know your thoughts, thanks

ErrorPro avatar Apr 29 '21 12:04 ErrorPro

Hey @ErrorPro, It would be super awesome and great if you add 'minChar'(minLengthAutocomplete) prop for <Autocomplete /> component, to reduce the amount of requests.

nalezhytyi avatar May 20 '21 10:05 nalezhytyi

@nalezhytyi Hey! It's already built in the lib and provided by a hook called usePlacesAutocompleteService which has debounce in it. Let me know if that's something you are looking for, thanks!

ErrorPro avatar May 25 '21 08:05 ErrorPro

First off: Thank you for a useful library!

I am working on an app that requires internationalization. Is it true to say the "Enter a location" language comes via the fact the Google Autocomplete Service is being used? If possible, having a means to pass through this language would be great.

sasedlock avatar Sep 02 '21 23:09 sasedlock

Hi @ErrorPro, I'm working on trying to use the sessionToken inside usePlacesAutocompleteService.

I took a quick look at the code and couldn't figure out if it would update the session token at some point, because I believe a fresh session token is needed after each call to placesService.getDetails

It would be helpful to expose a refreshSessionToken() function or something if we need to do that ourselves.

Thanks!

p-young avatar Sep 25 '21 10:09 p-young

First off: Thank you for a useful library!

I am working on an app that requires internationalization. Is it true to say the "Enter a location" language comes via the fact the Google Autocomplete Service is being used? If possible, having a means to pass through this language would be great.

Hey, AFAIK google uses the current user's language by default to translate the texts but you can pass a language setting to it, let me know if that's something you can use

ErrorPro avatar Oct 25 '21 11:10 ErrorPro

Hi @ErrorPro, I'm working on trying to use the sessionToken inside usePlacesAutocompleteService.

I took a quick look at the code and couldn't figure out if it would update the session token at some point, because I believe a fresh session token is needed after each call to placesService.getDetails

It would be helpful to expose a refreshSessionToken() function or something if we need to do that ourselves.

Thanks!

Hey, you are right regarding the use of session token, that would be indeed a good option to update the sessionToken value. I will provide a way to update it, I have two options in mind:

  1. Add an overwrite(proxy) method for placesService.getDetails which would not only get the details but will also refresh the session token. Pros: done automatically if sessionToken prop presents, cons: you wouldn't have an option to do it yourself.
  2. Add a method refreshSessionToken as you suggest which will re-generate the sessionToken whenever you call it. Pros: more flexible and gives more control over it, cons: you have to do it manually.

I am more inclined towards the first approach as it's more automatic and doesn't require knowledge about what/how/when refreshing the token. Any thoughts friends?

ErrorPro avatar Oct 25 '21 11:10 ErrorPro

I just release v.2.6.0 with an additional method to refresh the session token, check the readme for more info

ErrorPro avatar Oct 31 '21 16:10 ErrorPro

@ErrorPro plausible feature? #154

productpeter avatar Mar 15 '22 07:03 productpeter

Adding onChange would be really helpful to type an address that is not found by google.

vrinceanuv avatar Jun 06 '22 09:06 vrinceanuv