[✨] Allow preventing Form action #121
wmertens
started this conversation in
Proposals For Qwik
Replies: 1 comment
-
|
We moved this issue to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem?
When JS is enabled and you're using a Form only to redirect, it would save a server roundtrip to redirect immediately.
Describe the solution you'd like
action only fires after a custom onSubmit$ and only if the event is not prevented.
This is what the docs AI expects as the API
Describe alternatives you've considered
special attributes
Additional context
preventdefault is already used to allow action to run locally, so it will mean passing a fake event to onSubmit$ and checking if the default was prevented.
Beta Was this translation helpful? Give feedback.
All reactions