Skip to content

[BUG] Tooltips as react children element don't show anything #872

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

Closed
fmilioni opened this issue Dec 21, 2022 · 2 comments · Fixed by #873
Closed

[BUG] Tooltips as react children element don't show anything #872

fmilioni opened this issue Dec 21, 2022 · 2 comments · Fixed by #873
Labels

Comments

@fmilioni
Copy link

fmilioni commented Dec 21, 2022

Describe the bug
The tooltip is not displayed when it is created with custom html (React children elements). The children example is broken too.

Version of Package
v5.3.0

To Reproduce

<anyElement id="element-id" />

<Tooltip anchorId="element-id">
  <p>should work</p>
</Tooltip>

➡️ Workaround ⬅️

Just add content="." and it should works for now.

<anyElement id="element-id" />

<Tooltip anchorId="element-id" content=".">
  <p>now work</p>
</Tooltip>

Expected behavior
Should show tooltip

Desktop (please complete the following information if possible or delete this section):

  • OS: Windows
  • Chrome
  • Latest
@fmilioni fmilioni added the Bug label Dec 21, 2022
@gabrieljablonski
Copy link
Member

Hi Felipe!

We had noticed this issue earlier but hadn't started investigating it yet. Your workaround made it quite easy to realize what was causing the issue, so big thanks for that.

We should have a version with the fix up and running soon.

@phoenixeliot
Copy link

Yeah, I also found that it only shows the children if I set the content either as a prop or as a data attribute.

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

Successfully merging a pull request may close this issue.

3 participants