react-tooltip
react-tooltip copied to clipboard
Wrong tooltip positioning after content text change on click
Hey, I have one small problem with tooltip positioning in case tooltip content has changed while tooltip is displayed.
It's working if instead of passing function to getContent prop, I pass array. But then this function is being called every second.
function renderContent() {
return props.tooltipText;
}
return <ReactTooltip
...
// Tooltip position is not updated after text change
getContent=(renderContent)
// Tooltip position is updated but its being called every second
getContent={[renderContent, 1000]}
/>
You can try it live: https://codesandbox.io/s/react-tooltip-example-3116-forked-ydnr7
Any idea how to make it work without calling renderContent function in some interval?
Any update on that?
setting width on tooltip fixed it
having more content in data-tip direction to tooltip gets changed on every time hover over. But working fine for the small content.