Skip to content

fix(form-core): Trigger listeners and validation on setFieldValue #1680

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

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

Conversation

LeCarbonator
Copy link
Contributor

Also adds two meta properties, dontValidate and dontRunListeners. Should help in case someone wants extreme control, but it's more for our sake.

Copy link

nx-cloud bot commented Aug 7, 2025

View your CI Pipeline Execution ↗ for commit 724f0a4

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 25s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 24s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-07 13:01:04 UTC

@LeCarbonator LeCarbonator linked an issue Aug 7, 2025 that may be closed by this pull request
@LeCarbonator LeCarbonator marked this pull request as draft August 7, 2025 13:00
Copy link

pkg-pr-new bot commented Aug 7, 2025

More templates

@tanstack/angular-form

npm i https://pkg.pr.new/@tanstack/angular-form@1680

@tanstack/form-core

npm i https://pkg.pr.new/@tanstack/form-core@1680

@tanstack/lit-form

npm i https://pkg.pr.new/@tanstack/lit-form@1680

@tanstack/react-form

npm i https://pkg.pr.new/@tanstack/react-form@1680

@tanstack/solid-form

npm i https://pkg.pr.new/@tanstack/solid-form@1680

@tanstack/svelte-form

npm i https://pkg.pr.new/@tanstack/svelte-form@1680

@tanstack/vue-form

npm i https://pkg.pr.new/@tanstack/vue-form@1680

commit: 724f0a4

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.61%. Comparing base (c82fe54) to head (724f0a4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1680      +/-   ##
==========================================
+ Coverage   90.49%   90.61%   +0.12%     
==========================================
  Files          37       37              
  Lines        1683     1705      +22     
  Branches      421      435      +14     
==========================================
+ Hits         1523     1545      +22     
  Misses        143      143              
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LeCarbonator
Copy link
Contributor Author

I initially thought I should mark as draft to refactor how form listeners are currently set up. However, it appears that it would be a breaking change since fieldApi is always passed to it.

So I suppose this is already done.

@LeCarbonator LeCarbonator marked this pull request as ready for review August 7, 2025 13:54
@LeCarbonator LeCarbonator changed the title Make setFieldValue trigger listeners and validation fix(form-core): Trigger listeners and validation on setFieldValue trigger listeners and validation Aug 8, 2025
@LeCarbonator LeCarbonator changed the title fix(form-core): Trigger listeners and validation on setFieldValue trigger listeners and validation fix(form-core): Trigger listeners and validation on setFieldValue Aug 8, 2025
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.setFieldValue doesn't trigger validation
1 participant