Skip to content

Commit

Permalink
fix: show already written feedback on mount
Browse files Browse the repository at this point in the history
closes #11
  • Loading branch information
juancarlosfarah committed May 22, 2019
1 parent 7faf977 commit c09757a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/common/FormDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ class FormDialog extends Component {
initialInput: '',
};

componentDidMount() {
const { initialInput } = this.props;
if (initialInput !== '') {
this.setState({
input: initialInput,
});
}
}

componentDidUpdate(prevProps, prevState) {
const { initialInput } = this.props;
const { initialInput: prevInitialInput } = prevProps;
Expand Down

0 comments on commit c09757a

Please sign in to comment.