Shopify / ui-extensions

MIT License
267 stars 36 forks source link

TextField autocomplete suggestions #1820

Open patryk-smc opened 7 months ago

patryk-smc commented 7 months ago

Please list the related package(s)

@shopify/ui-extensions-react

If this related to specific APIs or components, please list them here

TextField component

Is your feature request related to a problem? Please describe.

I'm using Map component and next to it, I have TextField which allows users to search for locations on the map. I would like to suggest places as they type, similar to the native Address component

Describe the changes you are looking for

I would like TextField could accept a list of autocomplete suggestions and display them like on the image below

Describe alternatives you’ve considered

Popover component but it needs an activator

Additional context

Screenshot 2024-03-12 at 20 29 25@2x

Screenshot 2024-03-12 at 20 28 05@2x

Screenshot 2024-03-12 at 20 29 02@2x

patryk-smc commented 2 months ago

Since autocomplete providers were introduced since I posted this issue, I just wanted to let you know that this is still needed for text inputs that are not related to shipping addresses.

iwarshak commented 1 month ago

I have a non-map related use case for this in my checkout extension.

I have an extension which presents options for a customer to choose from. Typically I can use any ChoiceList when it's only a few choices. If there are hundreds of choices, it is impractical to display these as ChoiceList. A Select is possible, but it would be very tedious for customers to select from.

I would love to see an Autocomplete component be exposed in the checkout