How do I submit a form on an onChange
event of an tag, with without triggering the default behaviour(Page reload). I found out, that I can access the form from the event with the .form
element. But if I trigger .form.submit()
the page reloads although I have stated on:submit|preventDefault
.
I prepared an example of my Problem:
https://svelte.dev/repl/894212c7c3d847dd961745f5e9d5750a?version=3.46.2
Also is there like a clean/correct/best-practice way of solving this, without using an submit button?
Thanks in advance for your help!