@@ -104,6 +104,7 @@ var ReactTooltip = function (_Component) {
104
104
isCapture : props . isCapture || false
105
105
} ;
106
106
_this . delayShowLoop = null ;
107
+ _this . delayHideLoop = null ;
107
108
return _this ;
108
109
}
109
110
@@ -153,6 +154,7 @@ var ReactTooltip = function (_Component) {
153
154
key : 'componentWillUnmount' ,
154
155
value : function componentWillUnmount ( ) {
155
156
clearTimeout ( this . delayShowLoop ) ;
157
+ clearTimeout ( this . delayHideLoop ) ;
156
158
this . unbindListener ( ) ;
157
159
this . removeScrollListener ( ) ;
158
160
this . mount = false ;
@@ -338,14 +340,14 @@ var ReactTooltip = function (_Component) {
338
340
this . setState ( {
339
341
placeholder : tooltipText ,
340
342
multilineCount : multilineCount ,
341
- place : e . currentTarget . getAttribute ( 'data-place' ) ? e . currentTarget . getAttribute ( 'data-place' ) : this . props . place ? this . props . place : 'top' ,
342
- type : e . currentTarget . getAttribute ( 'data-type' ) ? e . currentTarget . getAttribute ( 'data-type' ) : this . props . type ? this . props . type : 'dark' ,
343
- effect : e . currentTarget . getAttribute ( 'data-effect' ) ? e . currentTarget . getAttribute ( 'data-effect' ) : this . props . effect ? this . props . effect : 'float' ,
344
- offset : e . currentTarget . getAttribute ( 'data-offset' ) ? e . currentTarget . getAttribute ( 'data-offset' ) : this . props . offset ? this . props . offset : { } ,
345
- html : e . currentTarget . getAttribute ( 'data-html' ) ? e . currentTarget . getAttribute ( 'data-html' ) : this . props . html ? this . props . html : false ,
346
- delayShow : e . currentTarget . getAttribute ( 'data-delay-show' ) ? e . currentTarget . getAttribute ( 'data-delay-show' ) : this . props . delayShow ? this . props . delayShow : 0 ,
347
- delayHide : e . currentTarget . getAttribute ( 'data-delay-hide' ) ? e . currentTarget . getAttribute ( 'data-delay-hide' ) : this . props . delayHide ? this . props . delayHide : 0 ,
348
- border : e . currentTarget . getAttribute ( 'data-border' ) ? e . currentTarget . getAttribute ( 'data-border' ) === 'true' : this . props . border ? this . props . border : false ,
343
+ place : e . currentTarget . getAttribute ( 'data-place' ) || this . props . place || 'top' ,
344
+ type : e . currentTarget . getAttribute ( 'data-type' ) || this . props . type || 'dark' ,
345
+ effect : e . currentTarget . getAttribute ( 'data-effect' ) || this . props . effect || 'float' ,
346
+ offset : e . currentTarget . getAttribute ( 'data-offset' ) || this . props . offset || { } ,
347
+ html : e . currentTarget . getAttribute ( 'data-html' ) || this . props . html || false ,
348
+ delayShow : e . currentTarget . getAttribute ( 'data-delay-show' ) || this . props . delayShow || 0 ,
349
+ delayHide : e . currentTarget . getAttribute ( 'data-delay-hide' ) || this . props . delayHide || 0 ,
350
+ border : e . currentTarget . getAttribute ( 'data-border' ) === 'true' || this . props . border || false ,
349
351
extraClass : extraClass ,
350
352
multiline : multiline
351
353
} ) ;
@@ -407,7 +409,8 @@ var ReactTooltip = function (_Component) {
407
409
var delayHide = this . state . delayHide ;
408
410
409
411
clearTimeout ( this . delayShowLoop ) ;
410
- setTimeout ( function ( ) {
412
+ clearTimeout ( this . delayHideLoop ) ;
413
+ this . delayHideLoop = setTimeout ( function ( ) {
411
414
_this4 . setState ( {
412
415
show : false
413
416
} ) ;
0 commit comments