8000 fix: correct type for initialValues in FormProps interface by logaretm · Pull Request #179 · formwerkjs/formwerk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: correct type for initialValues in FormProps interface #179

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

Merged
merged 5 commits into from
May 20, 2025

Conversation

logaretm
Copy link
Member

Builds on top of the work done in #176 to address both cases.

In this PR we use function overloading for useForm to steer it towards inferring the values from the schema or the initialValues depending on whichever is present or if both are, with preference to the schema.

Copy link
changeset-bot bot commented May 20, 2025

🦋 Changeset detected

Latest commit: 39b4b78

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@formwerk/core Patch
@formwerk/devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@genu
Copy link
Contributor
genu commented May 20, 2025

In my testing, seems to working! 😄

Excellent work 🚀

@logaretm
Copy link
Member Author

Cool, I will merge it then. Thanks for checking it out.

@logaretm logaretm merged commit ac250ed into main May 20, 2025
3 checks passed
@logaretm logaretm deleted the fix/internal-values-inference-alt branch May 20, 2025 16:57
logaretm added a commit that referenced this pull request May 21, 2025
* fix: correct type for initialValues in FormProps interface

* chore: add changeset

* chore: formatting

* chore: add playground

* fix: added returntypes explicitly and overloaded useForm

---------

Co-authored-by: Eugen Istoc <eugenistoc@gmail.com>
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
0