Wire together checkboxes and presets and use new /createRoom api
This commit is contained in:
parent
c708976635
commit
cd26d1323f
5 changed files with 124 additions and 13 deletions
|
@ -25,14 +25,15 @@ module.exports = React.createClass({
|
|||
mixins: [PresetsController],
|
||||
|
||||
onValueChanged: function(ev) {
|
||||
this.setState({preset: ev.target.value})
|
||||
this.setState({preset: ev.target.value}, this.props.onChange);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<select className="mx_Presets" onChange={this.onValueChanged} defaultValue={this.state.preset}>
|
||||
<option value="private_chat">Private Chat</option>
|
||||
<option value="public_chat">Public Chat</option>
|
||||
<select className="mx_Presets" onChange={this.onValueChanged} value={this.state.preset}>
|
||||
<option value={this.Presets.PrivateChat}>Private Chat</option>
|
||||
<option value={this.Presets.PublicChat}>Public Chat</option>
|
||||
<option value={this.Presets.Custom}>Custom</option>
|
||||
</select>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue