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

Input - fix type error #66

Open
mikestarrdev opened this issue Dec 28, 2022 · 4 comments
Open

Input - fix type error #66

mikestarrdev opened this issue Dec 28, 2022 · 4 comments
Assignees

Comments

@mikestarrdev
Copy link
Contributor

When using Input, the localform prop gives the following type error:

Input.d.ts(7, 5): The expected type comes from property 'localForm' which is declared here on type 'IntrinsicAttributes & InputProps & CustomInputProps'

@jonathanprozzi
Copy link
Member

Ah! Can you post a few more details about the usage if you're able? Didn't see this when using it in Dungeon Master but it may be a different usecase. I think I know what's up but some more context would be helpful if you can!

@jonathanprozzi jonathanprozzi self-assigned this Dec 29, 2022
@jonathanprozzi
Copy link
Member

jonathanprozzi commented Dec 29, 2022

Also, if you're using this within the context of a form, could you post that entire snippet (including the localForm instantiation)

I'm adding a Controlled Input that can be used outside of a form, so that'll be in soon.

@scottrepreneur
Copy link
Member

Explicitly wants to use UseFormReturn<FieldValues, any> for the localForm type.

@scottrepreneur
Copy link
Member

scottrepreneur commented Feb 11, 2023

This is specifically when you specify defaultValues in your useForm hook.

We likely want to use any or object here for FieldValues

Screenshot_2023-02-11_at_16 49 53

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