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

Allow resolver output type to truly differ #11951

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jedahu
Copy link

@jedahu jedahu commented May 30, 2024

Removing the TFieldValues constraint from TTransformedValues allows for resolvers to parse to different shaped output types.

Defaulting TTransformValues to TFieldValues instead of undefined means some conditional types can be removed (like those on UseFormHandleSubmit).

I have changed the types only. There are no runtime changes in this PR.

This allows for resolvers to parse to a different type that doesn't have to have
the same shape as TFieldValues.

This commit contains type-only changes. No runtime changes are introduced.
Test that `useWatch` returns `TFieldValues` values, not `TTransformedValues`
ones.

Test that `TTransformedValues` are submitted on success and `TFieldValues` on
failure.
@Fazla-GroM
Copy link

Any progress on this ?

@jedahu
Copy link
Author

jedahu commented Sep 29, 2024

It was ready to go but didn't get merged so it's just a case of fixing the conflicts again.

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 this pull request may close these issues.

2 participants