-
-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
bugSomething isn't workingSomething isn't working
Description
- Before posting an issue, read the FAQ and search the previous issues.
Description
Even if I cancel the submit in onSubmit
, to call a remote function instead, it is still calling this method to remove the form from the DOM. So if I return errors instead of redirecting, all the user sees is an empty page where the form used to be.
sveltekit-superforms/src/lib/client/superForm.ts
Lines 1413 to 1418 in 85a6264
function EnhancedForm_destroy() { | |
if (EnhancedForm?.parentElement) { | |
EnhancedForm.remove(); | |
} | |
EnhancedForm = undefined; | |
} |
This is called in onDestroy, which triggers if you put superForm(...)
inside $derived()
and either call invalidateAll()
or otherwise unmount the page in some way.
If applicable, a MRE
You may need to refresh the content window once to see the issue occur.
https://www.sveltelab.dev/l4x79459y8yei54
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working