0

There is a Tooltip example in react-toolbox offical docs. How can i show Tooltip only onClick event on Input.

peja
  • 866
  • 10
  • 19

1 Answers1

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