Skip to content

Commit

Permalink
Fix for delayShwo #163
Browse files Browse the repository at this point in the history
  • Loading branch information
wwayne committed Aug 1, 2016
1 parent c0c4b7a commit 7b7e547
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 7b7e547

Please sign in to comment.