HiDeoo / intro.js-react

Intro.js react wrapper
MIT License
395 stars 58 forks source link

How can i added delay for prevent this bugs? #107

Closed Farhatdjehan closed 1 year ago

Farhatdjehan commented 1 year ago

Describe the bug

image

i use nextjs v12 and then want to highlight the other element at the bottom.. but the element not ready yet to highlight.. is there any solution?

To Reproduce

  1. Add step
  2. Add highlight element at the bottom

Expected behavior

add delay for waiting my element ready

How often does this bug happen?

Every time

System Info

No response

Additional Context

No response

HiDeoo commented 1 year ago

You can check the dynamic elements section of the README for this specific case.

Basically, when your element becomes ready, you can use the updateStepElement() to update the element associated to a specific step.

For more details, you can also check the PR that implemented this feature and I also found this old example using this API to use a dynamically added element for the step 3.