Is your feature request related to a problem? Please describe.
When using react-hook-form, it's ability to focus on the input automatically on error uses ref.focus().
However, react-datepicker uses the nomenclature ref.setFocus()
Describe the solution you'd like
An alias ref.focus() to allow better compatibility with the ecosystem
Describe alternatives you've considered
Intercepting the ref myself, calling ref.setFocus():
Is your feature request related to a problem? Please describe. When using
react-hook-form
, it's ability to focus on the input automatically on error usesref.focus()
.However, react-datepicker uses the nomenclature
ref.setFocus()
Describe the solution you'd like An alias
ref.focus()
to allow better compatibility with the ecosystemDescribe alternatives you've considered
Intercepting the ref myself, calling
ref.setFocus()
:setFocus()
,setBlur()
, etc.customInputRef
, but it only allows legacy string refsAdditional context https://react-hook-form.com/docs/useform/setfocus