Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input <select><option/><select/> #1

Open
EmanuelJorge3MA opened this issue Apr 12, 2023 · 1 comment
Open

Input <select><option/><select/> #1

EmanuelJorge3MA opened this issue Apr 12, 2023 · 1 comment

Comments

@EmanuelJorge3MA
Copy link

EmanuelJorge3MA commented Apr 12, 2023

Olá Diego, Olá Devs,
Obrigado por este excelente projecto, ajudou muito a entender melhor como funciona os forms e seu inputs.

A minha dúvida é como funcionaria o input <select> e como seria a separação em um único file e ser reutilizado para outros forms ou componentes, utilizando o react-hook-form ?

Obrigado

@weslley75
Copy link

Fala Emanuel beleza?

para select funciona mais ou menos da mesma forma você passa o register no select:

<select {...register("gender")} >
  <option value="female">female</option>
  <option value="male">male</option>
  <option value="other">other</option>
</select>

Fonte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants