Skip to content

Commit

Permalink
Implementing componentDidUpdate check
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jun 20, 2018
1 parent 8b6523e commit 1b1b3db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/code_editor/code_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ export class EuiCodeEditor extends Component {
}
}

componentDidUpdate(prevProps) {
if ((this.props.mode !== prevProps.mode) && this.isCustomMode()) {
this.setCustomMode();
}
}

render() {
const {
width,
Expand Down

0 comments on commit 1b1b3db

Please sign in to comment.