How to keep the beacon on the same step when the tour is closed. default behaviour is beacon goes to the next step.
I tried changing the callback but couldnt find a way to do so.
This is my joyride callback func.
const handleJoyrideCallback = (data: CallBackProps) => {
const { action, index, status, type } = data;
if (
([EVENTS.STEP_AFTER, EVENTS.TARGET_NOT_FOUND] as string[]).includes(type)
) {
setCalendarJoyrideState((s) => {
s.stepIndex = index + (action === ACTIONS.PREV ? -1 : 1);
return s;
});
} else if (
([STATUS.FINISHED, STATUS.SKIPPED] as string[]).includes(status)
) {
stopCalendarJoyride();
}
};
New contributor
Ishan Dhawane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.