Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait until element exists? #471

Open
zthomas1 opened this issue Jan 25, 2024 · 3 comments
Open

Wait until element exists? #471

zthomas1 opened this issue Jan 25, 2024 · 3 comments

Comments

@zthomas1
Copy link

My Tour implementation is independent of a react component stack.

I would like to 'wait' for a particular element to be in the DOM before rendering that tour step.

when onPopoverRender is executed the active element is already set to a dummy div in the case that my element does not exist yet.

There does not appear to be any API action available after step 1 is completed and before step 2 is executed where I could wait until step2's element is available in the DOM.

Any ideas?
Thank you.

@zthomas1
Copy link
Author

perhaps an onPopoverPreRender method? This would allow developers to implement their own logic to ensure that the targeted element is in the DOM before rendering the tour step.

Thoughts?

@paulhan221
Copy link

@zthomas1 Were you able to find a workaround for this by any chance?

@xionnon
Copy link

xionnon commented Mar 1, 2024

Possible solution: In the onHighlighted API, check if step1 has been completed, and then prepare the work for step2.
@zthomas1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants