Make CreateRoom remember what the values of its fields were. Remove some fairly pointless atoms

This commit is contained in:
Erik Johnston 2015-07-16 17:20:03 +01:00
parent 47f4c0dfff
commit aa1b763518
10 changed files with 55 additions and 203 deletions

View file

@ -25,7 +25,7 @@ module.exports = React.createClass({
mixins: [RoomAliasController],
onValueChanged: function(ev) {
this.setState({room_alias: ev.target.value})
this.props.onChange(ev.target.value);
},
onFocus: function(ev) {
@ -72,7 +72,8 @@ module.exports = React.createClass({
render: function() {
return (
<input type="text" className="mx_RoomAlias" placeholder="Alias (optional)"
onChange={this.onValueChanged} onFocus={this.onFocus} onBlur={this.onBlur}/>
onChange={this.onValueChanged} onFocus={this.onFocus} onBlur={this.onBlur}
value={this.props.alias}/>
);
}
});