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

My tooltip does not appear #469

Closed
AndAShape opened this issue Feb 13, 2019 · 6 comments
Closed

My tooltip does not appear #469

AndAShape opened this issue Feb 13, 2019 · 6 comments

Comments

@AndAShape
Copy link

AndAShape commented Feb 13, 2019

I have...

import ReactTooltip from 'react-tooltip'

<ReactTooltip effect="solid" />

<th data-tip={text} ... />

Just like the instructions say. If I uncheck a bunch of CSS rules then I can see the tool tip sitting empty on the screen.

But it doesn't appear when I roll over the . What reason could there be for this?

@aronhelser
Copy link
Collaborator

If your item is not a child of the ReactToolTip, you need to use the data-for='happyFace' property on your item, and the id='happyFace' property on the ReactToolTip, so they link up. It's shown in the first example. I'll take a look at the code at the top and see why the first example code shown is not correct.

@AndAShape
Copy link
Author

That didn't fix it unfortunately.

@AndAShape
Copy link
Author

AndAShape commented Feb 14, 2019

It works if I add a tooltip to another page element even without specifying an id. Why doesn't it like my generated table header cells?

@aronhelser
Copy link
Collaborator

aronhelser commented Feb 14, 2019 via email

@AndAShape
Copy link
Author

Where is the optimum place to do this? After every render?

@AndAShape
Copy link
Author

I did this...

componentDidUpdate() {
   ReactTooltip.rebuild();
}

aronhelser added a commit that referenced this issue Sep 16, 2020
docs(readme): add tip on rebuild for dynamic content relates to #469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants