Replies: 5 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
@cgatian @paulm17 First up, sorry for the misinformation. Well, not quite—it's kind of related, but unfortunately, I didn't consider how this relates to the React adapter. So far, my suspicions are that the form.mount() is being called, but before it can finish, the useStore is subscribing to the state of the form and logging it out. Now, I don't think this is an issue as the form is not mounted. However, I will admit I don't like the DX... I'll continue to look into this, out of curiosity is this causing issues other than just the init values being logged? Just so I can understand the problems a little better 🤟 As a heads up I deleted my answer as I don't want to confuse anyone thinking this was solved |
Beta Was this translation helpful? Give feedback.
-
It seems like this is by design. If so, I believe it will be better if they could give the user the option to either enable or disable this behavior. I am trying to migrate our forms to this form, now that I encountered this, I don't think I can proceed anymore! |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? The form submit button should start out disabled. |
Beta Was this translation helpful? Give feedback.
-
Would checking for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
😕 When I build a simple form with validation and subscribe using
useStore
the initial values for bothcanSubmit
andisValid
istrue
. That seems like an odd choice for initial values, but maybe I'm missing something!I tried adding my validator to
onMount
, that didn't seem to help.https://stackblitz.com/edit/tanstack-form-4xzdhemm?file=src%2Findex.tsx&preset=node
Beta Was this translation helpful? Give feedback.
All reactions