shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
62.46k stars 3.51k forks source link

autocomplete issues with react-form-hooks #445

Open djstein opened 1 year ago

djstein commented 1 year ago

after switching over to the the react-form-hooks based inputs from https://ui.shadcn.com/docs/forms/react-hook-form I have noticed that autocomplete for anything except username and password is not working. based on the MDN doc: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete I am unable to determine what is missing for it to activate.

Note: In order to provide autocompletion, user-agents might require <input>\<select>\<textarea> elements to:

  1. Have a name and/or id attribute

  2. Be descendants of a <form> element

  3. The form to have a submit button

any thoughts on this?

Moshyfawn commented 1 year ago

Hm, React Hook Form doesn't do anything regarding the autocomplete functionally except potentially pass down your field name as a name prop. Additionally, the underling Input component is the same shadcn/ui Input