I remade the component using Google provided classes.
Google Class 'Autocomplete' handles session tokens automatically. We still need to test this as charges can rack up quickly if not handled properly.
the Package addresses config is modified to include a "Google Places API Key" reference to a Project's .env file
When the User searches in the 1st search bar, a dropdown of 'autocomplete' results will show up.
When the User clicks a dropdown result, the result is parsed into the address fields in the 2nd input bar.
These fields cannot be altered, except Address Line 2. That is data Google does not have.
I chose to make these fields read-only, so we can verify that these addresses are real (according to Google).
72 #75
I remade the component using Google provided classes.
Google Class 'Autocomplete' handles session tokens automatically. We still need to test this as charges can rack up quickly if not handled properly.
Frontend example https://play.tailwindcss.com/t8e1AuhUos
When the User searches in the 1st search bar, a dropdown of 'autocomplete' results will show up. When the User clicks a dropdown result, the result is parsed into the address fields in the 2nd input bar. These fields cannot be altered, except Address Line 2. That is data Google does not have. I chose to make these fields read-only, so we can verify that these addresses are real (according to Google).