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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error in ref props of the Form component #46

Closed
KoichiKiyokawa opened this issue Jan 11, 2022 · 1 comment 路 Fixed by #47
Closed

Type error in ref props of the Form component #46

KoichiKiyokawa opened this issue Jan 11, 2022 · 1 comment 路 Fixed by #47

Comments

@KoichiKiyokawa
Copy link
Contributor

First, thank you for such a nice library 馃帀

There is a type error when I pass ref to the <Form> component (but, it works well, just a type error).

image

repro: https://stackblitz.com/edit/nextjs-9mtrvu?file=pages/index.tsx

@smeijer
Copy link
Owner

smeijer commented Jan 11, 2022

Thanks for the report. I don't have time to look into it today, but I'll come back to you! If you by any chance have the time and mood to work on a fix, then please do. It would be much appreciated.

I suspect this cast from being the trouble maker:

// the cast ensures we can use the generic on the form component
export const Form = forwardRef(FormComponent) as typeof FormComponent;

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

Successfully merging a pull request may close this issue.

2 participants