rc-tooltip
Advanced tools
Comparing version 2.7.1 to 2.8.0
# History | ||
---- | ||
### 2.8.0 | ||
- add getTooltipContainer prop | ||
### 2.7.0 | ||
@@ -5,0 +9,0 @@ |
@@ -34,3 +34,4 @@ 'use strict'; | ||
mouseEnterDelay: _react2['default'].PropTypes.number, | ||
mouseLeaveDelay: _react2['default'].PropTypes.number | ||
mouseLeaveDelay: _react2['default'].PropTypes.number, | ||
getTooltipContainer: _react2['default'].PropTypes.func | ||
}, | ||
@@ -116,3 +117,8 @@ | ||
_react2['default'].unmountComponentAtNode(tipContainer); | ||
document.body.removeChild(tipContainer); | ||
if (this.props.getTooltipContainer) { | ||
var mountNode = this.props.getTooltipContainer(); | ||
mountNode.removeChild(tipContainer); | ||
} else { | ||
document.body.removeChild(tipContainer); | ||
} | ||
this.tipContainer = null; | ||
@@ -200,3 +206,8 @@ } | ||
this.tipContainer = document.createElement('div'); | ||
document.body.appendChild(this.tipContainer); | ||
if (this.props.getTooltipContainer) { | ||
var mountNode = this.props.getTooltipContainer(); | ||
mountNode.appendChild(this.tipContainer); | ||
} else { | ||
document.body.appendChild(this.tipContainer); | ||
} | ||
} | ||
@@ -203,0 +214,0 @@ return this.tipContainer; |
{ | ||
"name": "rc-tooltip", | ||
"version": "2.7.1", | ||
"version": "2.8.0", | ||
"description": "tooltip ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -143,2 +143,8 @@ # rc-tooltip | ||
</tr> | ||
<tr> | ||
<td>getTooltipContainer</td> | ||
<td>function</td> | ||
<td></td> | ||
<td>function returning html node which will act as tooltip contaier</td> | ||
</tr> | ||
</tbody> | ||
@@ -145,0 +151,0 @@ </table> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25879
573
171