Skip to content

Commit 4d2fc81

Browse files
committed
docs: enhance the description of onSubmit()
1 parent df4dfff commit 4d2fc81

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/.vitepress/theme/styles/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ iframe {
1414
.VPFeature:hover {
1515
border-color: var(--vp-button-brand-border);
1616
}
17+
18+
.custom-block-title {
19+
text-transform: uppercase;
20+
}

docs/api/use-form.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ This is your form submission handler, witch will pass your form's `values`. But
226226
function onSubmit (values: Values, helper: FormSubmitHelper): void | Promise<any>
227227
```
228228

229-
::: warning Note
230-
If `onSubmit()` function is synchronous, you need to call `setSubmitting(false)` yourself.
229+
::: warning Important
230+
When the `onSubmit()` function is asynchronous, the `isSubmitting` variable is automatically reset to `false` upon completion. Conversely, if `onSubmit()` is synchronous, you must manually call `setSubmitting(false)` to reset `isSubmitting`.
231231
:::
232232

233233
### onInvalid

0 commit comments

Comments
 (0)