You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using form enhancement you can return a callback function. The callback function has access to an update function which invokes the default form response behavior. The update function accepts options, but this doesn't seem to be in the Svelte documentation anywhere.
In order to know that you can, e.g. invoke update but not reset the form values (update({ reset: false })), you would have to check out the type hints in your code editor, or find out via 3rd party site. I personally discovered this very useful feature by way of StackOverflow.
Describe the problem
When using form enhancement you can return a callback function. The callback function has access to an
update
function which invokes the default form response behavior. Theupdate
function accepts options, but this doesn't seem to be in the Svelte documentation anywhere.In order to know that you can, e.g. invoke update but not reset the form values (
update({ reset: false })
), you would have to check out the type hints in your code editor, or find out via 3rd party site. I personally discovered this very useful feature by way of StackOverflow.Describe the proposed solution
Update the progressive enhancement or enhance reference pages to include a brief description of the
update
function options.Importance
nice to have
The text was updated successfully, but these errors were encountered: