You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently ran into a situation where we wanted to show a confirmation modal before moving on to the next step of a wizard. The logic for if the wizard can be advanced lives (correctly) in a validation step but validation shouldn't change stepping behavior. We should instead expose hooks like onBeforeNext and onBeforePrevious that would allow that navigation to abort or proceed as needed (maybe something like returning true/false if the hook is defined). This would provide better places to do things like warn before leaving the step.
Alternatively but less ideal, we could expose per-step action slots to override the next behavior. This is less ideal because it requires creating multiple components for otherwise encapsulated logic and would probably reduce code readbility
The text was updated successfully, but these errors were encountered:
Recently ran into a situation where we wanted to show a confirmation modal before moving on to the next step of a wizard. The logic for if the wizard can be advanced lives (correctly) in a validation step but validation shouldn't change stepping behavior. We should instead expose hooks like
onBeforeNext
andonBeforePrevious
that would allow that navigation to abort or proceed as needed (maybe something like returning true/false if the hook is defined). This would provide better places to do things like warn before leaving the step.Alternatively but less ideal, we could expose per-step action slots to override the next behavior. This is less ideal because it requires creating multiple components for otherwise encapsulated logic and would probably reduce code readbility
The text was updated successfully, but these errors were encountered: