react-codemirror2
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -217,3 +217,5 @@ "use strict"; | ||
this.emulating = true; | ||
this.editor.setValue(value); | ||
var lastLine = this.editor.lastLine(); | ||
var lastChar = this.editor.getLine(this.editor.lastLine()).length; | ||
this.editor.replaceRange(value || '', { line: 0, ch: 0 }, { line: lastLine, ch: lastChar }); | ||
this.mirror.setValue(value); | ||
@@ -393,3 +395,5 @@ this.editor.clearHistory(); | ||
if (!this.hydrated) { | ||
this.editor.setValue(props.value || ''); | ||
var lastLine = this.editor.lastLine(); | ||
var lastChar = this.editor.getLine(this.editor.lastLine()).length; | ||
this.editor.replaceRange(props.value || '', { line: 0, ch: 0 }, { line: lastLine, ch: lastChar }); | ||
} | ||
@@ -396,0 +400,0 @@ this.hydrated = true; |
{ | ||
"name": "react-codemirror2", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "a tiny react codemirror component wrapper", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31559
577
0