Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Update component.js (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwaniYDV authored Aug 13, 2020
1 parent 46338f3 commit 6dec455
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/routes/LeaveMessage/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ export default class LeaveMessage extends Component {
}
}

constructor(props) {
super(props);
this.setState(this.getDefaultState());
this.validateAll();
componentDidMount() {
this.setState(this.getDefaultState(), this.validateAll);
}

renderForm = ({ loading, departments, valid = this.isValid() }, { name, email, department, message }) => (
Expand Down

0 comments on commit 6dec455

Please sign in to comment.