1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Rename 'lineNumber' to 'displayLineNumbers'

This commit is contained in:
David Pavlík
2017-12-23 22:51:38 +01:00
parent 7a4258bb20
commit 1f5f6c3b0e
5 changed files with 9 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ export default class CodeEditor extends React.Component {
this.value = this.props.value
this.editor = CodeMirror(this.refs.root, {
value: this.props.value,
lineNumbers: this.props.lineNumber,
lineNumbers: this.props.displayLineNumbers,
lineWrapping: true,
theme: this.props.theme,
indentUnit: this.props.indentSize,
@@ -141,8 +141,8 @@ export default class CodeEditor extends React.Component {
this.editor.setOption('indentWithTabs', this.props.indentType !== 'space')
}
if (prevProps.lineNumber !== this.props.lineNumber) {
this.editor.setOption('lineNumbers', this.props.lineNumber)
if (prevProps.displayLineNumbers !== this.props.displayLineNumbers) {
this.editor.setOption('lineNumbers', this.props.displayLineNumbers)
}
if (needRefresh) {