How to properly close/skip the tour with the custom tooltip component's close button? #645
-
I have a custom tooltip component with a custom button as below:
by calling the closeProps.onClick() method, I was able to close/skip the tour in the Joyride's callback function: const handleJoyrideCallback = (data: CallBackProps) => {
}; This does close the tooltip popup. However, when I start the tour again by setting "run" ro 'true', the tour will continue to the step where it left off when I closed the tour. I would like it to start a new tour. Am I doing something wrong? Is there a better wat to skip/close the tour? Thank you again! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the Close button's onPress handler, I just invoked the skipProps.onClick(), that seems solved the problem. Does that sounds a correct fix? |
Beta Was this translation helpful? Give feedback.
In the Close button's onPress handler, I just invoked the skipProps.onClick(), that seems solved the problem. Does that sounds a correct fix?
<Button
icon={{ icon: closeIcon, tooltip: 'Exit' }}
variant={ButtonVariant.PrimaryLight}
onPress={() => {
closeProps?.onClick(
(new MouseEvent('click') as unknown) as ReactMouseEvent
);
skipProps?.onClick(
(new MouseEvent('click') as unknown) as ReactMouseEvent
);
}}
/>