Skip to content

Commit

Permalink
Add componentWillReceiveProps
Browse files Browse the repository at this point in the history
  • Loading branch information
TaeminPark committed May 25, 2017
1 parent 099057d commit 9d1d043
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DayPickerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export default class DayPickerInput extends React.Component {
this.state = getStateFromProps(props);
}

componentWillReceiveProps(nextProps) {
this.state = getStateFromProps(nextProps);
}

componentWillUnmount() {
/* istanbul ignore next */
clearTimeout(this.clickTimeout);
Expand Down

0 comments on commit 9d1d043

Please sign in to comment.