qwik
qwik copied to clipboard
[✨] Add a flag for when a Form action$ is dirty/changed
Is your feature request related to a problem?
When creating large forms, its not possible to know if the form has been edited without adding a onChange event to every input. This can be a lot of effort and adds some overhead.
There is also no way to tell if the form has changed, only the individual inputs.
Describe the solution you'd like
I'd like a boolean value added to the ActionStore so that we know when a form has changed. When clicking on a button with type="reset" it would be changed back to false.
Alternatively, an event listener on the form for when any of the inputs change
Describe alternatives you've considered
Adding an event listener to every input.
Additional context
No response
ModularForms works with Qwik and supports watching form states (at just 2.2kb)