Bug: Error Store Does Not Automatically Update #536
Labels
bug
Something isn't working
confirmed
Confirmed bug, will be worked upon in a near release.
sveltekit-2
Related to SvelteKit 2
Description
The error store does not automatically update when an error changes.
A form can only be submitted if all fields are error-free. However, in this library, the error state does not update to reflect new errors if we trigger a new one immediately.
Only happens when use:enhance is turned on
Steps to Reproduce
Expected Behavior
The error store should update automatically to reflect the new errors.
Actual Behavior
The new error is not reflected in the UI, leading to inconsistencies.
This produces some weird side effects, like not reacting to errors when submitting the form for a second time
Workaround
A hacky workaround involves manually updating the error store using the
onUpdate
option:If applicable, a MRE
Use this template project to create a minimal reproducible example that you can link to here: link to open in a new tab)
The text was updated successfully, but these errors were encountered: