繁体   English   中英

如何在React Toolbox中仅显示工具提示onClick

[英]How to show Tooltip only onClick in react toolbox

react-toolbox官方文档中有一个工具提示示例 如何在Input上仅显示工具提示onClick事件。

如果不想在鼠标输入时显示工具提示,则应分叉该项目并进行以下更改:

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);
      };

handleMouseEnter = (event) => {
        return false;
      };

handleMouseLeave = (event) => {
        return false;
      };

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM