There is a Tooltip example in react-toolbox offical docs. How can i show Tooltip only onClick event on Input.
Asked
Active
Viewed 4,006 times
0
-
Referencing the documentation, tooltipShowOnClick property doesn't help ? – arikanmstf Jan 22 '18 at 20:52
1 Answers
0
If you don't want to show tooltip on mouse enter, you should fork the project and make following changes:
at components/tooltip/Tooltip.js:
handleMouseEnter = (event) => {
this.activate(this.calculatePosition(event.currentTarget));
if (this.props.onMouseEnter) this.props.onMouseEnter(event);
};
handleMouseLeave = (event) => {
this.deactivate();
if (this.props.onMouseLeave) this.props.onMouseLeave(event);
};
TO
handleMouseEnter = (event) => {
return false;
};
handleMouseLeave = (event) => {
return false;
};

arikanmstf
- 462
- 7
- 16