Workday / canvas-kit

Development kits to implement UI following the Workday Canvas Design System (https://canvas.workday.com/). See our Component Storybook -
https://workday.github.io/canvas-kit/
Apache License 2.0
297 stars 220 forks source link

Preview Select doesn't support autofill/autocomplete #780

Open jamesfan opened 4 years ago

jamesfan commented 4 years ago

🐛 Bug Report

The Preview Select doesn't support the browser autofill/autocomplete feature: https://developers.google.com/web/fundamentals/design-and-ux/input/forms#use_metadata_to_enable_auto-complete

To Reproduce

View this CodeSandbox: https://codesandbox.io/s/select-autofill-mm6vv (this pulls from an older version of Select which was still a Labs component, but the issue still applies)

Ensure autofill is enabled in your browser and that you have an address saved. Start typing your address into the Street Address field. Select the option to autofill the remaining fields with your address. Street Address, Zip Code, and State will autofill, but State (Labs) will not.

Expected Behavior

The State (Labs) Select should autofill as well.

jamesfan commented 4 years ago

The Adobe Spectrum team handled this by rendering a hidden native select behind the scenes and handling its onChange event: https://youtu.be/dxDcBB7Xoxs?t=393