Skip to content

Commit

Permalink
unbind Dropdown's event handler when component is unmounting
Browse files Browse the repository at this point in the history
  • Loading branch information
cty committed Jun 26, 2015
1 parent d3e166d commit a299e4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ var Dropdown = React.createClass({
this.unbindOuterHandlers();
},

componentWillUnmount: function () {
this.unbindOuterHandlers();
},

setDropdownState: function(state, callback) {
if (state) {
this.bindOuterHandlers();
Expand Down

0 comments on commit a299e4b

Please sign in to comment.