Skip to content

Commit 74660ac

Browse files
sync kit docs
1 parent ec7aae4 commit 74660ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/svelte.dev/content/docs/kit/20-core-concepts/30-form-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Without an argument, `use:enhance` will emulate the browser-native behaviour, ju
369369
370370
### Customising use:enhance
371371
372-
To customise the behaviour, you can provide a `SubmitFunction` that runs immediately before the form is submitted, and (optionally) returns a callback that runs with the `ActionResult`. Note that if you return a callback, the default behavior mentioned above is not triggered. To get it back, call `update`.
372+
To customise the behaviour, you can provide a `SubmitFunction` that runs immediately before the form is submitted, and (optionally) returns a callback that runs with the `ActionResult`.
373373
374374
```svelte
375375
<form
@@ -391,7 +391,7 @@ To customise the behaviour, you can provide a `SubmitFunction` that runs immedia
391391
392392
You can use these functions to show and hide loading UI, and so on.
393393
394-
If you return a callback, you may need to reproduce part of the default `use:enhance` behaviour, but without invalidating all data on a successful response. You can do so with `applyAction`:
394+
If you return a callback, you override the default post-submission behavior. To get it back, call `update`, which accepts `invalidateAll` and `reset` parameters, or use `applyAction` on the result:
395395
396396
```svelte
397397
/// file: src/routes/login/+page.svelte

0 commit comments

Comments
 (0)