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

feat: auto field value update #837

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: auto field value update #837

wants to merge 3 commits into from

Conversation

edmundhung
Copy link
Owner

Fix #600

This is my 3rd attempt to eliminate the need for manually passing the key to each input by updating the field values directly. Instead of relying on the existing key and initialValue, this approach updates the fields based on both the intent payload and the provided default values.

The key difference comparing to the previous solution is that Conform will only update a field if it has explicit information to do so. In other words, fields are updated only when instructed, ensuring a more targeted and predictable behavior.

Copy link

changeset-bot bot commented Dec 15, 2024

⚠️ No Changeset found

Latest commit: 86f5f9e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

pkg-pr-new bot commented Dec 15, 2024

Open in Stackblitz

More templates

@conform-to/dom

npm i https://pkg.pr.new/@conform-to/dom@837

@conform-to/react

npm i https://pkg.pr.new/@conform-to/react@837

@conform-to/yup

npm i https://pkg.pr.new/@conform-to/yup@837

@conform-to/validitystate

npm i https://pkg.pr.new/@conform-to/validitystate@837

@conform-to/zod

npm i https://pkg.pr.new/@conform-to/zod@837

commit: 86f5f9e

Copy link

cloudflare-workers-and-pages bot commented Dec 15, 2024

Deploying conform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86f5f9e
Status: ✅  Deploy successful!
Preview URL: https://d97ff15d.conform.pages.dev
Branch Preview URL: https://intent-side-effect.conform.pages.dev

View logs

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.

Warning: A props object containing a "key" prop is being spread into JSX:
1 participant