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
The bug comes form TypeScript in the form of red lines due to the type definitions mismatch and second one in the console from React: " Warning: Cannot update a component (Field) while rendering a different component (Field). To locate the bad setState() call inside Field, follow the stack trace as described...."
Confirming this issue. If you have default values, they default to undefined and updating them gives you
component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
The validation works just fine on each individual input, but the data is not available to the form provider
So I was getting all kinds of errors by following what typescript wanted me to do with index and name. turns out, everything works when I ignore typescript and follow the docs. The issue is that my form field's TParentData does not extend any[]. I'm not sure why, since it's definitely an array.
@SergiuPlesco please split this issue up into smaller byte sized chunks. There are some concerns here around the default warning (which should be fixed here: #606), while other comments are flagging challenges with the array API (fixing here: #588)
Describe the bug
The bug comes form TypeScript in the form of red lines due to the type definitions mismatch and second one in the console from React: " Warning: Cannot update a component (
Field
) while rendering a different component (Field
). To locate the bad setState() call insideField
, follow the stack trace as described...."Your minimal, reproducible example
https://codesandbox.io/p/devbox/react-form-2n6vht
Steps to reproduce
Expected behavior
No errors or warnings in the console or files
How often does this bug happen?
Every time
Screenshots or Videos
Platform
macbook pro, m1
nextjs 14
Tanstack Form adapter
react-form
TanStack Form version
0.13.6
TypeScript version
5
Additional context
No response
The text was updated successfully, but these errors were encountered: