Skip to content

Commit

Permalink
Editor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Jun 28, 2018
1 parent 1133e1c commit ebfb526
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/components/manage/Tiles/Description/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ export default class Edit extends Component {
* @returns {undefined}
*/
onChange(editorState) {
this.setState({ editorState });
this.props.onChangeField(
'description',
editorState.getCurrentContent().getPlainText(),
);
this.setState({ editorState }, () => {
this.props.onChangeField(
'description',
editorState.getCurrentContent().getPlainText(),
);
});
}

/**
Expand Down
11 changes: 6 additions & 5 deletions src/components/manage/Tiles/Title/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ export default class Edit extends Component {
* @returns {undefined}
*/
onChange(editorState) {
this.setState({ editorState });
this.props.onChangeField(
'title',
editorState.getCurrentContent().getPlainText(),
);
this.setState({ editorState }, () => {
this.props.onChangeField(
'title',
editorState.getCurrentContent().getPlainText(),
);
});
}

/**
Expand Down

0 comments on commit ebfb526

Please sign in to comment.