tell tooltip when format bar gets hidden, as it won't be unmounted
This commit is contained in:
parent
c8c4dc29d1
commit
55c1c5e582
2 changed files with 22 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue