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

fix minor bugs

fix codemirror bug
fix style bug of in NoteList
fix Redux store bug: Cruch on deleting empty folder
This commit is contained in:
Dick Choi
2016-10-13 15:47:25 +09:00
parent ed5f3a6202
commit 2fdea6cd61
4 changed files with 29 additions and 27 deletions

View File

@@ -98,8 +98,8 @@ export default class CodeEditor extends React.Component {
}
handleChange (e) {
this.value = this.editor.getValue()
if (this.props.onChange) {
this.value = this.editor.getValue()
this.props.onChange(e)
}
}
@@ -121,6 +121,7 @@ export default class CodeEditor extends React.Component {
reload () {
// Change event shouldn't be fired when switch note
this.editor.off('change', this.changeHandler)
this.value = this.props.value
this.editor.setValue(this.props.value)
this.editor.clearHistory()
this.editor.on('change', this.changeHandler)