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

fix: field defaultValue should precedence over form defaultValues #463

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

minosss
Copy link
Contributor

@minosss minosss commented Sep 12, 2023

Set the form's value when creating a field with defined default value. Close #435

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 12, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@crutchcorn
Copy link
Member

Thanks for this! Can you fix the merge conflicts and I can merge this in? 😊

@minosss
Copy link
Contributor Author

minosss commented Oct 17, 2023

Done

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
packages/form-core/src/FormApi.ts 76.69% <100.00%> (+0.17%) ⬆️
packages/form-core/src/utils.ts 89.13% <ø> (ø)
packages/react-form/src/createFormFactory.ts 100.00% <ø> (ø)
packages/react-form/src/useField.tsx 85.71% <100.00%> (ø)
packages/react-form/src/useForm.tsx 88.88% <100.00%> (ø)
packages/form-core/src/FieldApi.ts 87.27% <94.44%> (-0.93%) ⬇️

📢 Thoughts on this report? Let us know!.

@crutchcorn
Copy link
Member

Apologies - looks like format failed. Any chance you can run prettier over your new code? I would typically do this on behalf of contributors, but I'm knee-deep in Zod validator logic ATM

@minosss
Copy link
Contributor Author

minosss commented Oct 17, 2023

done

@crutchcorn crutchcorn merged commit 5b74e0d into TanStack:main Oct 17, 2023
5 checks passed
@crutchcorn
Copy link
Member

Merged! Thanks so much for this contribution and your patience!

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.

[Form Core] defaultValue from field doesn't take precedence over form defaultValues
3 participants