react-ace
Advanced tools
Comparing version 6.1.3 to 6.1.4
@@ -8,2 +8,6 @@ # Changelog | ||
## 6.1.4 | ||
* Fixes #479 Diff component does not refresh when value prop changes | ||
## 6.1.3 | ||
@@ -10,0 +14,0 @@ |
@@ -50,2 +50,12 @@ 'use strict'; | ||
_createClass(DiffComponent, [{ | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(props) { | ||
var value = props.value; | ||
if (value !== this.state.value) { | ||
this.setState({ value: value }); | ||
} | ||
} | ||
}, { | ||
key: 'onChange', | ||
@@ -52,0 +62,0 @@ value: function onChange(value) { |
{ | ||
"name": "react-ace", | ||
"version": "6.1.3", | ||
"version": "6.1.4", | ||
"description": "A react component for Ace Editor", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
"sinon": "6.0.1", | ||
"webpack": "4.13.0", | ||
"webpack": "4.14.0", | ||
"webpack-cli": "^3.0.2", | ||
@@ -54,0 +54,0 @@ "webpack-dev-server": "^3.1.3" |
@@ -16,2 +16,10 @@ import SplitEditor from './split.js'; | ||
componentWillReceiveProps(props) { | ||
const {value} = props; | ||
if (value !== this.state.value) { | ||
this.setState({value}); | ||
} | ||
} | ||
onChange(value) { | ||
@@ -18,0 +26,0 @@ this.setState({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2074212
9283