HiDeoo / intro.js-react

Intro.js react wrapper
MIT License
407 stars 58 forks source link

onExit firing even on step completion #76

Closed sambhav2612 closed 2 years ago

sambhav2612 commented 2 years ago

Hello @HiDeoo, we are building a platform tour using this wrapper however, the onExit method is firing even after properly completing the steps with onComplete working normally.

Expected behavior:

HiDeoo commented 2 years ago

Thanks for the feedback.

It looks like I'm not doing anything fancy regarding these callbacks as they're directly used with the default intro.js callbacks (onexit & oncomplete) so the current behavior is the default one when using intro.js.

I don't like the idea of potentially changing the behavior of these callbacks and differ from the default behavior of intro.js (even tho I think I agree with your expected behavior), altho, I pass down the stepIndex in the onExit() callback (which is a difference between this wrapper & intro.js) so it's fairly easy to figure out if the tour is complete using only this callback.