Skip to content

Dynamic tooltip content not working #1160

Answered by gabrieljablonski
viveleroi asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is that you're using "[data-tooltip-content]" as the selector. If there is no error (more specifically, if data-tooltip-content={undefined}), the tooltip won't detect it as a valid anchor, so any changes made to it won't be detected.

This is not a bug, since the alternative would be to watch for changes on all elements on the page (instead of just detected anchors), which is something we intentionally avoid.

I recommend you use data-tooltip-id explicitly, since you might run into other issues selecting the anchors like this.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@viveleroi
Comment options

@gabrieljablonski
Comment options

Answer selected by viveleroi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants