Hi,
I want to add nice tooltips to some cells that I have in react-data-grid. So I add the required information to those cells (data-for and data-tip). When I hover on those cells, the tooltip shows up, and all is well.
In my app, I can change the layout of the datagrid by clicking a button (thus triggering a re-render of the whole component which contains the data-grid and the tooltip).
When I do this, the datagrid still contains the cells for the hover, and they still contain the data-for and data-tip. But when I hover over the cells, the tooltip does not show up any more. (The tooltip is still in the DOM, but its style information is not updated any more although I hover over the corresponding cell.)
Any help is greatly appreciated!
Inside the event handler for the button, you might try the ReactTooltip.rebuild() method, to let it re-discover the cells.
Thanks for the pointer! Actually, adding it to the event handler was too early, but I added it to componentDidUpdate(), and this works beautifully! Thank you for your quick and very helpful response.
Nicole
Most helpful comment
Inside the event handler for the button, you might try the
ReactTooltip.rebuild()method, to let it re-discover the cells.