Need help with forwarding refs for react-hook-form usage. #2768
Unanswered
thevipinmishra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm working on a set of re-usable components library in React where I'm utilizing ark-ui components and they are mostly going to be used with reac-hook-form library.
Now, this is the pattern I'm following, to add the ref on the "internal hidden input" components so that react-hook-form can easily identify them.
Is it the correct usage? most of the components are working but having issues with Slider and Datepicker components.
In Slider - I'm getting TypeScript issues related to
min
andmax
types beingstring | number | undefined
- I don't know how, I'm just spreading the props.In datepicker - How to get this working with Range picker since it requires 2 Inputs?
I would really appreciate some help here. 🙏🙏
Beta Was this translation helpful? Give feedback.
All reactions