[Wizard] Add the ability to invoke OnFinish
#3648
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
The
FluentWizard
currently allows you to customize theButtonTemplate
which is great! And there is a public method exposed (GoToStepAsync
) which allows you to essentially call theNext
andPrevious
buttons manually from your custom buttons. However, there is no way to call theOnFinish
logic from a custom button. This updates the component to expose a new method calledFinishAsync
with an optional parameter to validate the form contexts (which I modeled after theGoToStepAsync
method).I am not sure if/how you would like me to add unit tests for this. There are not any unit tests currently for the 'Customized'
ButtonTemplate
portion of the FluentWizard. I ran all the current unit tests to ensure that nothing broke. If you would like a unit test added, please specify what the unit test should be doing so that I know how you would like it written and what it would be testing.👩💻 Reviewer Notes
I have updated the demo site page to include a new
Finish
button on the "Customized Wizard" area.✅ Checklist
General
Component-specific