Skip to content

Bug: form.reset(value) seems not caring about value. It's reseting to the defaultValues anyway. #1485

@LumaKernel

Description

@LumaKernel

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

  1. Clone repro repo.
  2. npm i
  3. npm run dev
  4. Put values
  5. Submit
  6. 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

Screen.Recording.2025-05-07.at.17.46.26.mov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions