form icon indicating copy to clipboard operation
form copied to clipboard

onDynamicListenTo does not exist

Open RobertOstermann opened this issue 4 months ago • 5 comments

Describe the bug

Not sure if this should be listed as a bug or feature request. I noticed there was the recent addition of the onDynamic validation options, which is awesome! However, the validators section of a form.Field does not provide an onDynamicListenTo option to link the fields and the current props are missing JSDoc comments which are present for the other options.

Your minimal, reproducible example

N/A

Steps to reproduce

  1. Add to the validators section of a form.Field component
  2. Note there is no onDynamicListenTo prop, but there is an onDynamic option
  3. The other validator props have a ListenTo option to link fields
  4. The new onDynamic options also do not have JSDoc comments describing behavior

Expected behavior

OnDynamic should have an onDynamicListenTo prop to allow for linking fields with the onDynamic validation. I also would expect the onDynamic props to have JSDoc comments like the other fields have.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

  • Version: 1.19.2

TanStack Form adapter

react-form

TanStack Form version

1.19.2

TypeScript version

v5.8.3

Additional context

No response

RobertOstermann avatar Aug 16 '25 00:08 RobertOstermann

It's not a feature yet, but I don't see a reason why it shouldn't be. Thanks for the request!

LeCarbonator avatar Aug 16 '25 09:08 LeCarbonator

This work is very interesting. If it's okay, would it be okay to develop the feature and submit a PR?

jiji-hoon96 avatar Aug 21 '25 01:08 jiji-hoon96

@jiji-hoon96 Our PRs are open, so feel free!

LeCarbonator avatar Aug 21 '25 09:08 LeCarbonator

I've found using onChangeListenTo with my onDynamic validator causes buggy cross-field contamination so this likely would be a necessary feature

andreilgeorgescu avatar Dec 01 '25 19:12 andreilgeorgescu

This was the section I was supposed to work on, but due to a busy schedule, I've only just now made the revisions. Please review it.

jiji-hoon96 avatar Dec 03 '25 01:12 jiji-hoon96