@@ -1427,52 +1427,13 @@ exports.default = function (target) {
1427
1427
if ( MutationObserver == null ) return ;
1428
1428
1429
1429
var observer = new MutationObserver ( function ( mutations ) {
1430
- var _iteratorNormalCompletion = true ;
1431
- var _didIteratorError = false ;
1432
- var _iteratorError = undefined ;
1433
-
1434
- try {
1435
- for ( var _iterator = mutations [ Symbol . iterator ] ( ) , _step ; ! ( _iteratorNormalCompletion = ( _step = _iterator . next ( ) ) . done ) ; _iteratorNormalCompletion = true ) {
1436
- var mutation = _step . value ;
1437
- var _iteratorNormalCompletion2 = true ;
1438
- var _didIteratorError2 = false ;
1439
- var _iteratorError2 = undefined ;
1440
-
1441
- try {
1442
- for ( var _iterator2 = mutation . removedNodes [ Symbol . iterator ] ( ) , _step2 ; ! ( _iteratorNormalCompletion2 = ( _step2 = _iterator2 . next ( ) ) . done ) ; _iteratorNormalCompletion2 = true ) {
1443
- var element = _step2 . value ;
1444
-
1445
- if ( element === _this . state . currentTarget ) {
1446
- _this . hideTooltip ( ) ;
1447
- return ;
1448
- }
1449
- }
1450
- } catch ( err ) {
1451
- _didIteratorError2 = true ;
1452
- _iteratorError2 = err ;
1453
- } finally {
1454
- try {
1455
- if ( ! _iteratorNormalCompletion2 && _iterator2 . return ) {
1456
- _iterator2 . return ( ) ;
1457
- }
1458
- } finally {
1459
- if ( _didIteratorError2 ) {
1460
- throw _iteratorError2 ;
1461
- }
1462
- }
1463
- }
1464
- }
1465
- } catch ( err ) {
1466
- _didIteratorError = true ;
1467
- _iteratorError = err ;
1468
- } finally {
1469
- try {
1470
- if ( ! _iteratorNormalCompletion && _iterator . return ) {
1471
- _iterator . return ( ) ;
1472
- }
1473
- } finally {
1474
- if ( _didIteratorError ) {
1475
- throw _iteratorError ;
1430
+ for ( var m1 = 0 ; m1 < mutations . length ; m1 ++ ) {
1431
+ var mutation = mutations [ m1 ] ;
1432
+ for ( var m2 = 0 ; m2 < mutation . removedNodes . length ; m2 ++ ) {
1433
+ var element = mutation . removedNodes [ m2 ] ;
1434
+ if ( element === _this . state . currentTarget ) {
1435
+ _this . hideTooltip ( ) ;
1436
+ return ;
1476
1437
}
1477
1438
}
1478
1439
}
@@ -1640,8 +1601,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
1640
1601
1641
1602
function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function, not " + typeof superClass ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , enumerable : false , writable : true , configurable : true } } ) ; if ( superClass ) Object . setPrototypeOf ? Object . setPrototypeOf ( subClass , superClass ) : subClass . __proto__ = superClass ; }
1642
1603
1643
- var ReactTooltip = ( 0 , _staticMethods2 . default ) ( _class = ( 0 , _windowListener2 . default ) ( _class = ( 0 , _customEvent2 . default ) ( _class = ( 0 , _isCapture2 . default ) ( _class = ( 0 , _getEffect2 . default ) ( _class = ( 0 , _trackRemoval2 . default ) ( _class = ( _temp = _class2 = function ( _Component ) {
1644
- _inherits ( ReactTooltip , _Component ) ;
1604
+ var ReactTooltip = ( 0 , _staticMethods2 . default ) ( _class = ( 0 , _windowListener2 . default ) ( _class = ( 0 , _customEvent2 . default ) ( _class = ( 0 , _isCapture2 . default ) ( _class = ( 0 , _getEffect2 . default ) ( _class = ( 0 , _trackRemoval2 . default ) ( _class = ( _temp = _class2 = function ( _React$Component ) {
1605
+ _inherits ( ReactTooltip , _React$Component ) ;
1645
1606
1646
1607
function ReactTooltip ( props ) {
1647
1608
_classCallCheck ( this , ReactTooltip ) ;
@@ -2097,14 +2058,16 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
2097
2058
}
2098
2059
2099
2060
if ( html ) {
2100
- return _react2 . default . createElement ( Wrapper , _extends ( { className : tooltipClass + ' ' + extraClass
2061
+ return _react2 . default . createElement ( Wrapper , _extends ( { className : tooltipClass + ' ' + extraClass ,
2062
+ id : this . props . id
2101
2063
} , ariaProps , {
2102
2064
'data-id' : 'tooltip' ,
2103
2065
dangerouslySetInnerHTML : { __html : placeholder } } ) ) ;
2104
2066
} else {
2105
2067
return _react2 . default . createElement (
2106
2068
Wrapper ,
2107
- _extends ( { className : tooltipClass + ' ' + extraClass
2069
+ _extends ( { className : tooltipClass + ' ' + extraClass ,
2070
+ id : this . props . id
2108
2071
} , ariaProps , {
2109
2072
'data-id' : 'tooltip' } ) ,
2110
2073
placeholder
@@ -2114,7 +2077,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
2114
2077
} ] ) ;
2115
2078
2116
2079
return ReactTooltip ;
2117
- } ( _react . Component ) , _class2 . propTypes = {
2080
+ } ( _react2 . default . Component ) , _class2 . propTypes = {
2118
2081
children : _propTypes2 . default . any ,
2119
2082
place : _propTypes2 . default . string ,
2120
2083
type : _propTypes2 . default . string ,
0 commit comments