Browse Source

Fix tooltip overlay warning, close #6897

pull/6916/head
afc163 7 years ago
parent
commit
545d171223
  1. 2
      components/tooltip/demo/basic.md
  2. 2
      components/tooltip/index.tsx

2
components/tooltip/demo/basic.md

@ -17,7 +17,7 @@ The simplest usage.
import { Tooltip } from 'antd';
ReactDOM.render(
<Tooltip title="prompt text">
<Tooltip title={undefined}>
<span>Tooltip will show when mouse enter.</span>
</Tooltip>
, mountNode);

2
components/tooltip/index.tsx

@ -206,7 +206,7 @@ export default class Tooltip extends React.Component<TooltipProps, any> {
getTooltipContainer={getPopupContainer || getTooltipContainer}
ref="tooltip"
builtinPlacements={this.getPlacements()}
overlay={overlay || title}
overlay={overlay || title || ''}
visible={visible}
onVisibleChange={this.onVisibleChange}
onPopupAlign={this.onPopupAlign}

Loading…
Cancel
Save