tell tooltip when format bar gets hidden, as it won't be unmounted

This commit is contained in:
Bruno Windels 2019-10-02 14:31:42 +02:00
parent c8c4dc29d1
commit 55c1c5e582
2 changed files with 22 additions and 11 deletions

View file

@ -95,6 +95,8 @@ export default class InteractiveTooltip extends React.Component {
content: PropTypes.node.isRequired,
// Function to call when visibility of the tooltip changes
onVisibilityChange: PropTypes.func,
// flag to forcefully hide this tooltip
forceHidden: PropTypes.bool,
};
constructor() {
@ -269,8 +271,8 @@ export default class InteractiveTooltip extends React.Component {
renderTooltip() {
const { contentRect, visible } = this.state;
if (!visible) {
ReactDOM.unmountComponentAtNode(getOrCreateContainer());
if (this.props.forceHidden === true || !visible) {
return null;
}