Skip to content
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

Listener not run on array form field #1226

Open
tmcdo1 opened this issue Mar 6, 2025 · 0 comments
Open

Listener not run on array form field #1226

tmcdo1 opened this issue Mar 6, 2025 · 0 comments

Comments

@tmcdo1
Copy link

tmcdo1 commented Mar 6, 2025

Describe the bug

An onChange listener on a <form.Field mode="array"> is not run when there are changes to the input

Your minimal, reproducible example

https://stackblitz.com/edit/vitejs-vite-n6la3gan?file=src%2FApp.tsx

Steps to reproduce

Example Steps:

  1. Add a person
  2. Notice that the household size does not increase

General Steps:

  1. add an onChange listener to a <form.Field mode="array">
  2. use field.pushValue to update the field
  3. Observe that the onChange is not called

Expected behavior

Would expect the onChange listener to be called when a value is changed.

How often does this bug happen?

Every time

Screenshots or Videos

Screen.Recording.2025-03-05.at.18.16.45.mov

Platform

  • OS: MacOS
  • Browser: Arc v1.82.1
  • Chromium Engine Version: 133.0.6943.35

TanStack Form adapter

react-form

TanStack Form version

v1.0.0

TypeScript version

v5.7.2

Additional context

No response

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

No branches or pull requests

1 participant