Open
Description
Please list the package(s) involved in the issue, and include the version you are using
// package.json
"@shopify/ui-extensions": "2024.7.0",
Describe the bug
Custom extensions using the purchase.address-autocomplete.suggest API throw an error when the Autocomplete field is active in the "Street" field.
Steps to reproduce the behavior:
- Create an extension using the purchase.address-autocomplete.suggest api
- Install in a locally running store (error is swallowed on live store) with additional fields activated
- Activate the extension in the checkout page
- Visit the checkout page
- Select Germany (or another country using additional fields) from the country selector
- Enter text in the "Street" field
- The error should be thrown in the console: "Unsupported Address Autocomplete field: streetName"
Expected behavior
The extension works in the street field the same as it does in the "address line 1" field.
Screenshots
Additional context
The issue appears to stem from the Field property of Target interface in the AddressAutocompleteSuggestApi (found here: https://github.com/Shopify/ui-extensions/blob/unstable/packages/ui-extensions/src/surfaces/checkout/api/address-autocomplete/suggest.ts)
The Field property is defined as:
field: 'address1' | 'zip';
When it is passed streetName as the origin field of the Autocomplete it throws the error.