You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just render the app and take a look at the Form status.
Expected behavior
When the form mounts, the validations must be run to allow the form to update the isValid state.
How often does this bug happen?
Every time
Screenshots or Videos
Initial render:
After blurring the field:
After submit:
Platform
OS: MacOS
Browser: Chrome
Version: Latest
TanStack Form adapter
react-form
TanStack Form version
0.37.1
TypeScript version
5.3.3
Additional context
No response
The text was updated successfully, but these errors were encountered:
douglasjunior
changed the title
Migrating from final-form to @tanstack/react-form
Issues on migrating from final-form to @tanstack/react-formDec 3, 2024
Describe the bug
I'm trying to migrate from
final-form
to@tanstack/react-form
, but I struggled with some issues that I cant figure out how to solve at the moment.The first one may be a bug, but
form.state.isValid
starts withtrue
even with invalid fields.This can be reproduced even in the CodeSandbox example: https://codesandbox.io/p/devbox/boring-dust-crdfdk
It's important to mention that I can't force the form submission or field validation because we need to keep the field as
isTouched = false
.Focused state in the field
Final-form has a meta in the field to indicate that this field is on focus, in the same context, the form has an array indicating the focused fields.
This is useful to handle some situations in complex screens and also to highlight components.
Today the
@tanstack/react-form
only handles theblur
event to update theisTouched
state.Your minimal, reproducible example
https://codesandbox.io/p/devbox/boring-dust-crdfdk
Steps to reproduce
Just render the app and take a look at the
Form status
.Expected behavior
When the form mounts, the validations must be run to allow the form to update the
isValid
state.How often does this bug happen?
Every time
Screenshots or Videos
Initial render:
After blurring the field:
After submit:
Platform
TanStack Form adapter
react-form
TanStack Form version
0.37.1
TypeScript version
5.3.3
Additional context
No response
The text was updated successfully, but these errors were encountered: