Skip to content

Instantly share code, notes, and snippets.

@lobot
Created May 23, 2022 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lobot/f3ef64046357bed9c8db35bb0088c8fd to your computer and use it in GitHub Desktop.
Save lobot/f3ef64046357bed9c8db35bb0088c8fd to your computer and use it in GitHub Desktop.
Adding Address Autocomplete to Medusa
const handleSelect = ({ value }) => {
setFieldValue('postal_code', value.zip_code)
setFieldValue('city', value.city)
setFieldValue('province', value.state.toUpperCase())
setFieldValue('address_1', value.primary_line)
setFieldValue('country_code', 'US')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment