I am using react-boostrap's Popover with the OverlayTrigger class. My issue is that when I change the content on the Popover while it is displayed, it is properly resized but the position gets wrong. The popover maintains its top left corner position even if it is not aligned anymore with the OverlayTrigger
Here is what I am talking about:
Here is the code I am using in my render function, it's pretty straightforward:
const popover = (
<Popover id={this.props.htKey} >
{this.state.content}
</Popover>
);
return (
<OverlayTrigger
trigger={["hover", "focus"]}
delayShow={200}
placement="top"
overlay={popover}
onEntered={this.startExtendTimer}
onExited={this.resetContent}
>
<span>test</span>
</OverlayTrigger>
);
The startExtenTimer
calls a timeout that changes this.state.content
after a few seconds (therefore resulting in the issue that I show on the picture)
How can I change the content of the popover while keeping the correct alignment?