Closed ryou90 closed 3 months ago
Please provide a complete minimal reproduction. This contains several references to external files.
I have simplified and expanded the example as much as possible.
Please use something like sveltelab.dev or Stackblitz and post a link to a proper reproduction.
Updated to Svelte 5.0.0-next.203 and now it worked liked a charm :)
I'm on Svelte 5.0.0-next.264 and having the same issue. it's resetting to the default values when form is submitted.
@nareg23 The default behavior is that the form will be reset, just as with SvelteKit enhance. You can change this with the resetForm: false
option when calling superForm
.
Describe the bug
Hi, I can pass the superforms $formData state as arg in the @render formField($formData) snippet. Everthing works so far. The data is displayed correctly in the form. But if I enter a new value for the url field, it is immediately reset to the original value. It looks as if the two-way reactivity is broken in the snippet and the DOM is rerendered with the original values.
Reproduction
Minimal code snippet
Logs
No response
System Info
Severity
annoyance