Skip to content

Commit

Permalink
Merge pull request #80 from dmison/master
Browse files Browse the repository at this point in the history
update wrapMode if wrapEnabled prop changes
  • Loading branch information
chentsulin committed Jan 28, 2016
2 parents fd91f98 + 4ad8a00 commit 4182b83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default class ReactAce extends Component {
if (nextProps.fontSize !== oldProps.fontSize) {
this.editor.setFontSize(nextProps.fontSize);
}
if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {
this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);
}
if (nextProps.minLines !== oldProps.minLines) {
this.editor.setOption('minLines', nextProps.minLines);
}
Expand Down

0 comments on commit 4182b83

Please sign in to comment.