fix onVisible again (#2134)

This commit is contained in:
afc163 2016-06-22 22:54:54 +08:00
parent 193fa8e9d6
commit 151dc957a8
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ title: 基本
import { Tooltip } from 'antd';
ReactDOM.render(
<Tooltip title="提示文字" onVisibleChange={visible => console.log(visible)}>
<Tooltip title="提示文字">
<span>鼠标移上来就会出现提示</span>
</Tooltip>
, mountNode);

View File

@ -78,14 +78,14 @@ export default class Tooltip extends React.Component {
? `${children.props.className} ${openClassName}` : openClassName;
return (
<RcTooltip
{...this.props}
transitionName={transitionName}
builtinPlacements={placements}
overlay={title}
visible={visible}
onVisibleChange={this.onVisibleChange}
onPopupAlign={this.onPopupAlign}
ref="tooltip"
{...this.props}
onVisibleChange={this.onVisibleChange}
>
{visible ? cloneElement(children, { className: childrenCls }) : children}
</RcTooltip>