Async to wait for element on screen #1034
-
How do you solve the problem today when the element will still be rendered on the screen? I'm using react-joyride and in one of the steps, the helmet whose id is set takes a few seconds to appear on the screen when it reaches the step, instead, it skips to the next one. How do you do today? Is there any option to "wait/watch" for the id element to appear on the screen and then proceed to the next step? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hey @mabitten You'll need to use the controlled mode (setting a stepIndex that you must control yourself). |
Beta Was this translation helpful? Give feedback.
-
Hi @gilbarbara Perfect, I saw it before. But I think we write a lot of code in my case. Would it be interesting to create something asynchronous/observable to meet needs where I just need to wait for the element to be on the screen? I'm thinking about forking and implementing |
Beta Was this translation helpful? Give feedback.
-
Hey @mabitten |
Beta Was this translation helpful? Give feedback.
Hey @mabitten
You'll need to use the controlled mode (setting a stepIndex that you must control yourself).
Check the source code for the Controlled demo