Skip to content
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

Hi Guys!, there is way to go the previous item? #55

Open
rodrileonel opened this issue Oct 23, 2023 · 6 comments
Open

Hi Guys!, there is way to go the previous item? #55

rodrileonel opened this issue Oct 23, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@rodrileonel
Copy link

No description provided.

@rodrileonel rodrileonel changed the title Hi Guys!, there is way to go the previous? Hi Guys!, there is way to go the previous item? Oct 23, 2023
@talamaska talamaska added the enhancement New feature or request label Oct 23, 2023
@talamaska
Copy link
Owner

I haven't planned for this feature. You could restart the onboarding if the user have missed something or needs a reminder.
The implementation is done that way - If the user wants to display a slice of the list of the step he/she needs to set the stepIndexes, if it is set, then when navigating to the next step the previous is removed from the stack. If you display all the steps as defined in the steps List, then the items are not removed, I haven't made any logic to support navigating back.

@bcaspe
Copy link

bcaspe commented Dec 16, 2023

I did have an end user that requested this feature. It's not a deal breaker, but it might be a nice to have in the stepBuilder if not to hard to implement.

@talamaska
Copy link
Owner

It's hard to implement. The whole logic around the stepper is removing an item from the beginning of the list on next step. If I have removed the item from the list, I can't go back to it. I haven't revisited this logic since the first publish. Feel free to look around and suggest a PR with changes.

@bcaspe
Copy link

bcaspe commented Dec 16, 2023

Riiight. I see it. Instead of explicitly setting the stepIndexes when showing just a subset of the onboarding steps, one would need to set something like a startAt and endAt index value. Then you wouldn't need to remove the index as you went but could just increase or decrease the currentIndex until it is above endAt or below startAt... Something like that. I might try to do a PR if I have time.

Although the downside of this would be that you would have to run a sequential set of indexes (as now you can pick and choose which ones to show with the explicit list.

@talamaska
Copy link
Owner

Right, and I have made it support an arbitrary list of indexes not necessarily in order. See showWithIndexes

@bcaspe
Copy link

bcaspe commented Dec 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants