Bug: form.reset(value) seems not caring about value. It's reseting to the defaultValues anyway.
Describe the bug
I expected form.reset with the first arg, it resets with setting the default values to that arg, as written in JSDoc of the API.
But it seems resetting to the value as well as not supplying the arg.
Your minimal, reproducible example
https://github.com/LumaKernel/tanstack-form-issue-reset-with-values
Steps to reproduce
- Clone repro repo.
- npm i
- npm run dev
- Put values
- Submit
- Reset to the blank values.
Expected behavior
Reset to the value that is specified by arg. So, just the states reset.
How often does this bug happen?
Every time
Screenshots or Videos
https://github.com/user-attachments/assets/87e0afb2-3751-42db-980d-88b15115bb54
Platform
Node: v22.14.0 npm: 10.5.0
TanStack Form adapter
react-form
TanStack Form version
1.9.1
TypeScript version
5.8.3
Additional context
No response
Hi @LumaKernel
Thanks for the issue! we'd prefer it if you create us a codeSandbox or a stackBlitz, anything that makes it easier for us to take a quick look to diagnose things makes our lives so much easier 😄 ... But, I checked it out and at least on the first pass this issue has merit.
From what I can see the reset is working correctly, at least on first pass, but then something else comes in and wipes the state and defaultValues.
relates to https://github.com/TanStack/form/issues/1490
#1494 has been merged. Update your Tanstack Form version to v1.14.1.