Skip to content

Commit

Permalink
Merge pull request #164 from wwayne/fix
Browse files Browse the repository at this point in the history
Fix for delayShwo #163
  • Loading branch information
wwayne authored Aug 1, 2016
2 parents c0c4b7a + 7b7e547 commit 9f1cb9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ class ReactTooltip extends Component {
}
}

this.clearTimer()
if (delayShow) {
clearTimeout(this.delayShowLoop)
this.delayShowLoop = setTimeout(updateState, delayTime)
} else {
updateState()
Expand All @@ -274,18 +274,18 @@ class ReactTooltip extends Component {

if (!this.mount) return

const resetState = (resetPlace) => {
const resetState = () => {
this.setState({
show: false
})
this.removeScrollListener()
}

this.clearTimer()
if (delayHide) {
this.clearTimer()
this.delayHideLoop = setTimeout(resetState, parseInt(delayHide, 10))
} else {
resetState(true)
resetState()
}
}

Expand Down

0 comments on commit 9f1cb9b

Please sign in to comment.