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

When I change step, I can't open Tour! #584

Open
bogdan19981305 opened this issue Aug 10, 2023 · 4 comments
Open

When I change step, I can't open Tour! #584

bogdan19981305 opened this issue Aug 10, 2023 · 4 comments

Comments

@bogdan19981305
Copy link

Before I open Tour I need to setCurrentStep = 0

When I change steps in my app I change steps in Tour and on one step I can be on 4
but on next step, count of tour Steps can be 2 and then Tour can't open and don't give me error

If I don't do this I can't open Tour and I don't get an error
Can you fix pls this bug?

@elrumordelaluz
Copy link
Owner

Hi @bogdan19981305, thanks for open the Issue.

Mind creating a minimal reproduction in a sandbox in order to allow others to debug your use-case and try to find a solution? Thanks!

@bogdan19981305
Copy link
Author

bogdan19981305 commented Aug 10, 2023

https://codesandbox.io/p/sandbox/exciting-blackwell-npd98h

I wrote example, you can check

you need to play with steps and tourSteps

@elrumordelaluz
Copy link
Owner

This behaviour is expected, if you are on step 4 and remove the fourth one, the Tour doesn't have anything to show. And doesn't happen any error, since is code User land. What do you expect happens? Any input is super welcome!

@bogdan19981305
Copy link
Author

Sorry i haven't time for help you with this awesome library - but I showed you bug
I think we need to change currentStep to last in array if he changed with "useEffect" i think - this is my problem solving
I just wanted to help you

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

No branches or pull requests

2 participants