Skip to content

Commit

Permalink
Refactor events
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici authored and Çağatay Çivici committed Oct 8, 2018
1 parent a01d753 commit 54d4549
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export class Slider extends Component {
this.onBarClick = this.onBarClick.bind(this);
}

componentWillUnmount() {
this.unbindDragListeners();
}

onMouseDown(event, index) {
if(this.disabled) {
return;
Expand Down Expand Up @@ -82,6 +86,8 @@ export class Slider extends Component {
else
this.props.onSlideEnd({originalEvent: event, value: this.value});
}

this.unbindDragListeners();
}
}

Expand Down

0 comments on commit 54d4549

Please sign in to comment.