qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[✨] Add a flag for when a Form action$ is dirty/changed

Open DustinJSilk opened this issue 2 years ago • 1 comments

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

DustinJSilk avatar Apr 12 '23 18:04 DustinJSilk

ModularForms works with Qwik and supports watching form states (at just 2.2kb)

DustinJSilk avatar Apr 19 '23 14:04 DustinJSilk