slmgc / react-hint

Tooltip component for React, Preact, Inferno
https://react-hint.js.org/
MIT License
335 stars 28 forks source link

Warning: validateDOMNesting(...): <div> cannot appear as a child of <tr>. #38

Closed tnguyen14 closed 5 years ago

tnguyen14 commented 5 years ago

When I have a data-rh attribute on a <span> inside a <tr> element, the tooltip element is still created as a <div>, causing the warning:

Warning: validateDOMNesting(...): <div> cannot appear as a child of <tr>.

Is it possible for the tooltip element to be configured to be a span instead of div?

slmgc commented 5 years ago

Hey, sorry about the late reply, I had a really long vacation :)

If I understand your case correctly, a tooltip element is never rendered inside of a table, unless you place ReactHint inside of it and this is the thing you shouldn't do. You should place ReactHint in your topmost controller, if possible, closer to the body of the document. It would be great if you can provide a sample code which fails for you.

Hope this helps!

slmgc commented 5 years ago

I will close it, please feel free to reopen in case you still have this issue.