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

Incorrect type of useForm in createFormContext #2882

Closed
jagoral opened this issue Nov 5, 2022 · 4 comments
Closed

Incorrect type of useForm in createFormContext #2882

jagoral opened this issue Nov 5, 2022 · 4 comments

Comments

@jagoral
Copy link

jagoral commented Nov 5, 2022

What package has an issue

@mantine/form

Describe the bug

The type for useForm returned by createFormContext does not take the type of TransformValues into consideration.

What version of @mantine/hooks page do you have in package.json?

5.7.0

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Possible fix

I think that this change should help:
https://github.com/mantinedev/mantine/blob/master/src/mantine-form/src/FormProvider/FormProvider.tsx#L34
UseForm<Values> -> UseForm<Values, TransformValues>

@rtivital
Copy link
Member

rtivital commented Nov 5, 2022

Thanks for reporting

@AabhasDhaubanja
Copy link
Contributor

@rtivital I will be working on this issue

@AabhasDhaubanja
Copy link
Contributor

@rtivital I have opened a pr #2893

@rtivital
Copy link
Member

rtivital commented Nov 6, 2022

Fixed in 5.7.1

@rtivital rtivital closed this as completed Nov 6, 2022
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

3 participants