Did the new Blitz.js version 0.38.0 break onSubmit? #2509
Answered
by
flybayer
skorotkiewicz
asked this question in
Q&A
-
|
Yesterday I upgraded Blitz.js from version 0.36.4 to 0.38.0, today I wanted to start a new project, I created "Statuses (1)" I wanted to add a test Status, but unfortunately onSubmit does not work, it does not run the code in onSubmit at all. I use on the old version and on the newer version: $ blitz generate all status status:string (1) <h1>Create New Status</h1>
<StatusForm
submitText="Create Status"
onSubmit={async (values) => {
console.log(values) // <-- nothing, onSubmit don't starts when trying to add a new status
try {
const status = await createStatusMutation(values)
router.push(`/statuses/${status.id}`)
} catch (error) {
console.error(error)
return {
[FORM_ERROR]: error.toString(),
}
}
}}
/> |
Beta Was this translation helpful? Give feedback.
Answered by
flybayer
Jun 19, 2021
Replies: 1 comment 1 reply
-
|
Yes 😏 See the workaround and fix in #2511 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
skorotkiewicz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes 😏 See the workaround and fix in #2511