You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Dropdown component with React Hook Form, on submit, if the dropdown is the only field to fail validation then React Hook Form attempts to put a focus on the Dropdown field but cannot.
Standard input text and password fields work as expected, as does a password input wrapped in a div as generated by Prime React.
Create a react hook form with at least one PrimeReact Dropdown component (form can have other fields/inputs too).
Make sure the PrimeReact Dropdown component has some kind of validation - for example, field is required.
Fill in all fields, except for the PrimeReact Dropdown (or otherwise make this field invalid)
Submit the form to see e.focus / elm.focus error.
Expected behavior
With all other fields types, standard html text or password, PrimeReact InputText then when submitting the form, if there are errors the first field with an error is focused on.
I would expect that, if the PrimeReact Password component is the first invalid field then the form should focus on this field too.
The text was updated successfully, but these errors were encountered:
Describe the bug
Similar to #3645
When using Dropdown component with React Hook Form, on submit, if the dropdown is the only field to fail validation then React Hook Form attempts to put a focus on the Dropdown field but cannot.
Standard input text and password fields work as expected, as does a password input wrapped in a div as generated by Prime React.
Reproducer
https://codesandbox.io/s/blissful-butterfly-pc6xhk
PrimeReact version
8.7.2
React version
18.x
Language
ES6
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
With all other fields types, standard html text or password, PrimeReact InputText then when submitting the form, if there are errors the first field with an error is focused on.
I would expect that, if the PrimeReact Password component is the first invalid field then the form should focus on this field too.
The text was updated successfully, but these errors were encountered: