1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

fix InputTextareaToggable

This commit is contained in:
Tim Daubenschütz 2015-09-23 14:12:33 +02:00
parent 90d6ec20f6
commit 4acbc2c923

View File

@ -19,6 +19,12 @@ let InputTextAreaToggable = React.createClass({
};
},
componentDidMount() {
this.setState({
value: this.props.defaultValue
});
},
componentDidUpdate() {
// If the initial value of state.value is null, we want to set props.defaultValue
// as a value. In all other cases TextareaAutosize.onChange is updating.handleChange already