Replies: 1 comment 2 replies
-
Not sure where the inconsistency is coming from, this seems a bit buggy 🤔 (e.g. submit twice without interaction and the second submit clears the fields).
You can provide a callbacks to <form use:enhance={() => ({ update }) => update({ reset: false })}> (The outer function is called on submission, the inner on receiving a result.) |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I'm pretty new to sveltekit and loving it. But I've come across something unexpected that I'm going to assume is my fault before I create an issue.
I have a form with
use:enhance
and two text inputs (name and description). The form is to edit an existing resource. When the page is first loaded the expected/current values are visible in both inputs.If I change one input's value and click the submit button I observe
This is really unexpected because I see the expected value of the same field correctly displayed in all other places
<pre>
for debuggingSo the issue seems related the value binding and perhaps something to do with forms to me?
+page.svelte
Demo
I'm sure I'm just missing something trivial.
Beta Was this translation helpful? Give feedback.
All reactions