-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Prevent committing values while going back and empty invalid resubmitted steps #72
base: main
Are you sure you want to change the base?
BUGFIX: Prevent committing values while going back and empty invalid resubmitted steps #72
Conversation
Previously, an already validated step was not validated again when resending. This happens now. Co-Authored-By: arsors <[email protected]>
… forms. The __target argument that was used for the navigation of multistep forms did make no distinction between back and forth navigating which. This change alters the behavior and prevents committing when __target is prefixed with an exclamation mark.
…ngValuesWhileGoingBackInMultiStepForms
…th invalid values Previously already committed steps were only replaced when a new valid state was pushed. This was unexpected as the user had changed the values and expects the new state to be submitted. With this change a step is overwritten when submitted again with valid data or removed otherwise.
98bfedb
to
e4ee2dc
Compare
@MarcoPNS it would be great if you could test this with your use case. |
Hi! Thanks for your additional change. This seems to keep the MultiStepForm working as it did with my PR ✌️ |
I can confirm that this fixes the bug, but it will reset the complete form step once you navigate back and forth: Steps to reproduce:
ExpectedValue for ActualAll form fields of step 2 are reset |
@bwaidelich thanks for testing, i can confirm your findings. Seems we need a way to persist also the invalid submitted values. This will take some time to do right. Regards Martin |
…kInMultiStepForms
Navigation back and forth in multi step forms had some issues:
Back navigations would commit the entered values when valid:
The __target argument that was used for the navigation of multistep forms did make no distinction between back and forth navigating. This change alters the behavior and prevents committing when __target is
prefixed with an exclamation mark.
If invalid data was committed for an already committed step no message is shown but the old data is used silently.
Previously committed steps were only replaced when a new valid state was submitted. This is unexpected as the user had changed the values and expects the new state to be submitted.
With this change a step is overwritten when submitted again with valid data- If invalid data is submitted the step data is removed and the used will see the validation messages.