-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Hey there! First of all, thanks for this cool library. It has been working great.
We are having an issue when displaying the tooltip the first time after the user opens the app.

The tooltip dissapears that first time. After that, it works correctly:
The code is simple:
export default class ContextMenu extends React.PureComponent {
componentWillUnmount() {
if (this.ref) {
this.ref.hideMenu();
delete this.ref;
}
}
setRef = (ref) => {
if (!ref) {
return;
}
this.ref = ref;
if (ref) {
setTimeout(() => {
if (this.ref) {
this.ref.showMenu();
}
}, 100);
}
}
render() {
const actions = getActions(this.props);
return (
<ToolTip
actions={actions}
ref={this.setRef}
>
<View />
</ToolTip>
);
}
}Note that we had to introduce that delay because the tooltip doesn't appear when placed in componentDidMount.
I tried to debug this, as I thought that a hideMenu() was being called, but it wasn't. showMenu() is called correctly and then the context menu disappears without a call to hideMenu().
Any help would be appreciated, thanks!
Metadata
Metadata
Assignees
Labels
No labels
