React-tooltip: Unable to see tooltips for extra content added in the react component

Created on 17 Jul 2017  路  5Comments  路  Source: wwayne/react-tooltip

I have a react component to render search results.
Initially, I have just 50 results. So I mount 'results' component with 50 results.

<div id='results'>
   <div id='result1' data-tip="result1"></div>
          ..... (till 50 results)
   <ReactTooltip/>
</div>

Now I receive more 30 results. So I update my results component on similar lines.

The issue is, I now only see tooltips for first 50 results and not for the last 50 results.

Please help.

Most helpful comment

@amndevil687 try this

componentDidUpdate() { ReactTooltip.rebuild(); }

It works for me.

All 5 comments

I've got the same issue!

@amndevil687 try this

componentDidUpdate() { ReactTooltip.rebuild(); }

It works for me.

Unfortunately, that solution doesn't apply if you'd try to use react-tooltip in a functional component 馃槙

I agree this is probably a duplicate of #354 . But I don't think the body-events fix will help - that's just about how events are responded to, not which elements the tooltip will pay attention to. But it might be worth testing...

Was this page helpful?
0 / 5 - 0 ratings