-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
showOn not functioning as expected #1814
Comments
@mikeCGrant I wonder if this is an edge case or an off by one issue. If the next step is the last step, and it is skipped, we call |
I tested it with 3 steps too, setting the first to return false in the showOn method and still the subsequent steps didn't render. I also set step 2 to false to make sure it wasn't a first step only thing, again subsequent steps didn't render. |
I have this issue. It seems to be caused by this logic: _skipStep(step, forward) {
const index = this.steps.indexOf(step);
const nextIndex = forward ? index + 1 : index - 1;
if (nextIndex === this.steps.length - 1) {
this.complete();
} else {
this.show(nextIndex, forward);
}
} it seems like it should be comparing step.length the index, not nextIndex I have created a pull request that I believe resolves it: #1931 |
Merged the PR and released 9.1.1, please let me know if the issue is fixed! |
Thanks for jumping on this so quickly! Will try it out shortly and let you know |
In the documentation the showOn property description is as follows:
A function that, when it returns true, will show the step. If it returns false, the step will be skipped.
What I'm seeing:
Setting the return of showOn to false in the first step prevents rendering of any following step/s.
This can be seen from the following code:
The text was updated successfully, but these errors were encountered: