react-native-copilot
react-native-copilot copied to clipboard
Would like to run a function when "finish" is called, but not if "skip" was pressed
Is your feature request related to a problem? Please describe. I have an issue with the implementation of copilot. My app is separated across several screens, and after several steps on the first screen I would like to perform navigation to the next and continue the guide there. From there som more steps would be run before another navigation and so on.. But I would also like to implement that if user presses skip, no navigation happens and the guide is instead finished.
Describe the solution you'd like I'd like some sort of event to be triggered that differentiates between if the copilotsteps have been performed to completion on a page, or if the "skip" button was pressed (i.e if all copilotSteps on a page were followed or not). This way you could have differing logic based on this.
Describe alternatives you've considered I tried using copilotEvents and currentStep to differentiagte, but because currentStep seems to be set to the last step when pressing skip this did not work.
Teachability, Documentation, Adoption, Migration Strategy Hope this makes sense to anyone reading this :)
If you override the tooltipComponent you can get access to the skip / finish callbacks directly