-
-
Notifications
You must be signed in to change notification settings - Fork 578
fix: React adapter behavior has now been fixed #1903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: f9dec49 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit f9dec49
☁️ Nx Cloud last updated this comment at |
…ack/form into critical-react-adapter-fix
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1903 +/- ##
==========================================
- Coverage 90.35% 89.81% -0.55%
==========================================
Files 38 46 +8
Lines 1752 1924 +172
Branches 444 478 +34
==========================================
+ Hits 1583 1728 +145
- Misses 149 175 +26
- Partials 20 21 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| > = { | ||
| ...formApi, | ||
| handleSubmit: ((...props: never[]) => { | ||
| formApi._handleSubmit(...props) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 1.27.1 introduced a regression in the handleSubmit wrapper that breaks promise handling.
In PR #1903, TanStack converted class methods to arrow functions to fix setErrorMap not being available after spreading. However, the handleSubmit wrapper in useForm.tsx is missing a return statement:
// Current (broken)
handleSubmit: ((...props: never[]) => {
formApi._handleSubmit(...props) // Missing return!
}) as typeof formApi.handleSubmit,This causes:
await form.handleSubmit()resolves immediately instead of waiting for submissiononErrorcallbacks don't propagate correctly- Error state not captured in hooks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already fixed by: #1924
Just needs to release (will do now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Closes #1901