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: FormValue should never be null #719

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

aaronadamsCA
Copy link
Contributor

It looks like I made a mistake in #508 when I widened FormValue to include null in some cases. I'm reasonably confident a field's initialValue will never be null.

I noticed this when I created a component that takes name: FieldName<string | object>. You can see the strange behaviour here:

TypeScript Playground

You can see what happened when I ran git blame here:

image

Since this is a one-line change, I'm just submitting it through the GitHub UI to confirm the tests will pass.

Copy link

changeset-bot bot commented Jul 25, 2024

🦋 Changeset detected

Latest commit: 7aae87a

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

This PR includes changesets to release 4 packages
Name Type
@conform-to/dom Patch
@conform-to/react Patch
@conform-to/yup Patch
@conform-to/zod 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

@aaronadamsCA aaronadamsCA changed the title FormValue should never be null fix: FormValue should never be null Jul 25, 2024
Copy link
Owner

@edmundhung edmundhung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. Thanks!

Copy link

pkg-pr-new bot commented Aug 17, 2024

commit: 7aae87a

@conform-to/dom

pnpm add https://pkg.pr.new/@conform-to/dom@719

@conform-to/react

pnpm add https://pkg.pr.new/@conform-to/react@719

@conform-to/validitystate

pnpm add https://pkg.pr.new/@conform-to/validitystate@719

@conform-to/yup

pnpm add https://pkg.pr.new/@conform-to/yup@719

@conform-to/zod

pnpm add https://pkg.pr.new/@conform-to/zod@719

Open in Stackblitz

More templates

@edmundhung edmundhung merged commit ccf0ef4 into edmundhung:main Sep 10, 2024
21 checks passed
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