Skip to content

bug(nextjs): formApi.handleSubmit isn't trigerred #1505

@melkir

Description

@melkir

Describe the bug

Reading through https://tanstack.com/form/latest/docs/framework/react/guides/listeners#form-listeners, I tried to implement the auto-save functionality. The onChange is being triggered but the submit method doesn't trigger the action attached to the form (not calling the server).

Your minimal, reproducible example

https://tanstack.com/form/latest/docs/framework/react/guides/listeners#form-listeners

Steps to reproduce

  1. https://tanstack.com/form/latest/docs/framework/react/guides/ssr#using-tanstack-form-in-a-nextjs-app-router
  2. Implement the auto-save feature instead of the submit button

Expected behavior

The action is being triggered when the form is being submitted through the auto-save with the listeners.onChange debounce.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

MacOS, Chrome

TanStack Form adapter

None

TanStack Form version

1.11.1

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions