gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.88k stars 529 forks source link

stepIndex doesn't appear to work #223

Closed brandonmp closed 7 years ago

brandonmp commented 7 years ago

Setting stepIndex to, say, 3 in the demo doesn't seem to affect the starting step. Checking react devtools show that Joyride recognizes its props.stepIndex as 3, but seems to have no effect.

re8260 commented 7 years ago

+1

IanVS commented 7 years ago

Sorry, but I'm not sure exactly what you're saying. Can you give a bit of an example with some code?

PeterAronZentai commented 7 years ago

@IanVS - he says that the stepIndex parameter isn't working - setting it to whatever value does not have effect.

micahnz commented 7 years ago

yup seeing the same problem

gilbarbara commented 7 years ago

This will be fixed in V2 with controlled/uncontrolled tours

piotr-cz commented 6 years ago

There is a check in componentWillReceiveProps, but in componentDidMount start method is called without the stepIndex parameter

Maybe this issue should be left opened until it's fixed or implemented in v2

piotr-cz commented 6 years ago

It seems that stepIndex use is fixed by changing && to || at line 176 and commenting out line 222, but this may break other scenarios

On clicking next button, the toggleTooltip method is called twice, once with next action and second time with jump action. Executing the later one doesn't open tooltip.

nadim commented 5 years ago

In V2 the stepIndex parameter is ignored on tour start. Is there a way to start on a specific step without patching the src?