stimulus-places-autocomplete icon indicating copy to clipboard operation
stimulus-places-autocomplete copied to clipboard

Add more Address attributes

Open janpeterka opened this issue 1 year ago • 2 comments

Hi, searching for replacement for now deprecated geocomplete, I was happy to find this, as we are all into Stimulus!

I tried playing with this a bit, and there's one small issue - this controller doesn't support all fields we use.

Would it be possible to add these standard fields, returned from Google API, into targets and Address:

  • formatted_address
  • street_address
  • locality
  • sublocality
  • neighborhood
  • political

?

I can prepare PR, if this is acceptable.

Thank you!

(If it's not added, we will have to create our own controller, as we don'ŧ use ts in our project, so just extending this would be painful, if not impossible)

janpeterka avatar Apr 26 '23 16:04 janpeterka

Yeah Stimulus all the things 🥳

Sure you can open a PR that would be nice!

Thanks in advance

guillaumebriday avatar May 03 '23 15:05 guillaumebriday

Hi, thanks!

I opened https://github.com/stimulus-components/stimulus-places-autocomplete/pull/13, but I cannot test if it's working (I'm not familiar with ts->js conversion, Vite and all. Is it possible for you to test it? Or can you help me with doing so?

janpeterka avatar May 04 '23 12:05 janpeterka