Skip to content

fix(core): field unmount#2068

Open
TkDodo wants to merge 7 commits intoTanStack:mainfrom
TkDodo:feature/fix/field-unmount
Open

fix(core): field unmount#2068
TkDodo wants to merge 7 commits intoTanStack:mainfrom
TkDodo:feature/fix/field-unmount

Conversation

@TkDodo
Copy link

@TkDodo TkDodo commented Mar 6, 2026

Add unmounting to fields. field.mount now returns a cleanup function for unmounting.

Without unmounting, conditionally rendered fields will keep their field-level validations running even though the field isn’t rendered anymore.

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: b411f59

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

This PR includes changesets to release 13 packages
Name Type
@tanstack/form-core Patch
@tanstack/react-form Patch
@tanstack/angular-form Patch
@tanstack/form-devtools Patch
@tanstack/lit-form Patch
@tanstack/solid-form Patch
@tanstack/svelte-form Patch
@tanstack/vue-form Patch
@tanstack/react-form-nextjs Patch
@tanstack/react-form-remix Patch
@tanstack/react-form-start Patch
@tanstack/react-form-devtools Patch
@tanstack/solid-form-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

Fixes the issue with field unmount in core.
@nx-cloud
Copy link

nx-cloud bot commented Mar 6, 2026

View your CI Pipeline Execution ↗ for commit b411f59

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

☁️ Nx Cloud last updated this comment at 2026-03-06 12:47:57 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 6, 2026

More templates

@tanstack/angular-form

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

@tanstack/form-core

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

@tanstack/form-devtools

npm i https://pkg.pr.new/@tanstack/form-devtools@2068

@tanstack/lit-form

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

@tanstack/react-form

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

@tanstack/react-form-devtools

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

@tanstack/react-form-nextjs

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

@tanstack/react-form-remix

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

@tanstack/react-form-start

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

@tanstack/solid-form

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

@tanstack/solid-form-devtools

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

@tanstack/svelte-form

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

@tanstack/vue-form

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

commit: f020ec6

@TkDodo TkDodo marked this pull request as ready for review March 6, 2026 12:48
@sentry
Copy link

sentry bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.83%. Comparing base (6892ed0) to head (b411f59).
⚠️ Report is 146 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2068      +/-   ##
==========================================
- Coverage   90.35%   89.83%   -0.52%     
==========================================
  Files          38       49      +11     
  Lines        1752     2027     +275     
  Branches      444      523      +79     
==========================================
+ Hits         1583     1821     +238     
- Misses        149      182      +33     
- Partials       20       24       +4     

☔ 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.

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.

1 participant