Update room header when room name changes
This commit is contained in:
parent
8fe6411539
commit
6a76d8ace8
4 changed files with 21 additions and 5 deletions
|
@ -21,7 +21,7 @@ var React = require('react');
|
|||
module.exports = {
|
||||
propTypes: {
|
||||
onValueChanged: React.PropTypes.func,
|
||||
initalValue: React.PropTypes.string,
|
||||
initialValue: React.PropTypes.string,
|
||||
placeHolder: React.PropTypes.string,
|
||||
},
|
||||
|
||||
|
@ -33,18 +33,24 @@ module.exports = {
|
|||
getDefaultProps: function() {
|
||||
return {
|
||||
onValueChanged: function() {},
|
||||
initalValue: '',
|
||||
initialValue: '',
|
||||
placeHolder: 'Click to set',
|
||||
};
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
value: this.props.initalValue,
|
||||
value: this.props.initialValue,
|
||||
phase: this.Phases.Display,
|
||||
}
|
||||
},
|
||||
|
||||
componentWillReceiveProps: function(nextProps) {
|
||||
this.setState({
|
||||
value: nextProps.initialValue
|
||||
});
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
return this.state.value;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue