File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -539,7 +539,6 @@ class ReactTooltip extends React.Component {
539
539
const { delayShow, disable } = this . state ;
540
540
const { afterShow } = this . props ;
541
541
const placeholder = this . getTooltipContent ( ) ;
542
- const delayTime = parseInt ( delayShow , 10 ) ;
543
542
const eventTarget = e . currentTarget || e . target ;
544
543
545
544
// Check if the mouse is actually over the tooltip, if so don't hide the tooltip
@@ -552,6 +551,8 @@ class ReactTooltip extends React.Component {
552
551
return ;
553
552
}
554
553
554
+ const delayTime = ! this . state . show ? parseInt ( delayShow , 10 ) : 0 ;
555
+
555
556
const updateState = ( ) => {
556
557
if (
557
558
( Array . isArray ( placeholder ) && placeholder . length > 0 ) ||
@@ -575,7 +576,7 @@ class ReactTooltip extends React.Component {
575
576
} ;
576
577
577
578
clearTimeout ( this . delayShowLoop ) ;
578
- if ( delayShow ) {
579
+ if ( delayTime ) {
579
580
this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
580
581
} else {
581
582
updateState ( ) ;
You can’t perform that action at this time.
0 commit comments