Skip to content
Source
Sign inSign up
TanStack/form

onChangeListenTo will deactivate onChangeAsync of target #1410

Openelectrocnic(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

Having two form fields, field A with onChangeAsync and field B with onChangeListenTo, the onChangeAsync of field A will never be triggered. Once the target inside onChangeListenTo is renamed or the whole line is commented out, the onChangeAsync will trigger again.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-h3v7ps9t?file=src%2Findex.tsx

Steps to reproduce

Open stackblitz reproducible example, type in "error" into the firstname field. It should trigger an async error after 1 second, but does not. Comment out the onChangeListenTo in the Last Name form field, then the first name will trigger if "error" is entered.

Expected behavior

onChangeAsync should still work for all fields.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Windows 11, Edge Version 135.0.3179.54

TanStack Form adapter

react-form

TanStack Form version

v1.3.0

TypeScript version

v5.7.3

Additional context

No response

  1. Hello, are any updates for this issue?

  2. LeCarbonator(GitHub profile, opens in a new tab) added labelsv2: needs investigation

  3. Fixed in v2. Since this affects v1, the issue'll remain open.

  4. LeCarbonator(GitHub profile, opens in a new tab) removed labelsv2: needs investigation

  5. LeCarbonator(GitHub profile, opens in a new tab) added labelstype: bug

  6. LeCarbonator(GitHub profile, opens in a new tab) added labelsscope: core

  7. LeCarbonator(GitHub profile, opens in a new tab) added labelsarea: runtime

Sign in to join this conversation.