Expected behavior
When i tried to run the tour and click finish it is working. But when i tried to run once again refreshing the page it is not starting the tour.
Actual behavior
It should once again start the tour with same session.
Steps to reproduce the problem
My code:
static propTypes = { joyride: PropTypes.shape({ callback: PropTypes.func }) };
`static defaultProps = {
joyride: {}
};
handleClickStart = e => {
e.preventDefault();
this.setState({
run: true,
show: false,
stepIndex: 0,
});
};
handleJoyrideCallback = data => {
const { joyride } = this.props;
const { action, index, type } = data;
if (type === EVENTS.TOUR_END && this.state.run) {
console.log('tour');
console.log(this.state.run);
// Need to set our running state to false, so we can restart if we click start again.
this.setState({ run: false, stepIndex: 0 });
}
if (typeof joyride.callback === "function") {
joyride.callback(data);
} else {
console.group(type);
console.log(data); //eslint-disable-line no-console
console.groupEnd();
}
console.log(this.state.run);
};
`
Check out our FAQs, video guides, or reach out to us in lorem ipsum dolor sit amet, consecteur adipiscing elit.
),
placement: "top",
},
target: ".nav-list-3",
locale: { skip: "Skip", last: "Finish" },
},
]}
callback={this.handleJoyrideCallback}
/>`
>React version
>React-Joyride version
>Browser name and version
>Error stack (if available)
*If you want to get this issue fixed quickly, make sure to send a public URL or codesandbox example.*
`render() { const { run } = this.state; console.log('first', this.state.run); return (
View and manange your active subscriptions. Lorem ipsum dolor sit amet, consecteur adipiscing elit.
Check out our FAQs, video guides, or reach out to us in lorem ipsum dolor sit amet, consecteur adipiscing elit.