mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
fix invites
This commit is contained in:
parent
13f3548057
commit
d8bc362a89
@ -30,7 +30,6 @@ module.exports = React.createClass({
|
||||
mixins: [MemberListController],
|
||||
|
||||
getInitialState: function() {
|
||||
return { editing: false };
|
||||
},
|
||||
|
||||
memberSort: function(userIdA, userIdB) {
|
||||
@ -71,21 +70,9 @@ module.exports = React.createClass({
|
||||
});
|
||||
},
|
||||
|
||||
onPopulateInvite: function(inputText, shouldSubmit) {
|
||||
// reset back to placeholder
|
||||
this.refs.invite.setValue("Invite", false, true);
|
||||
this.setState({ editing: false });
|
||||
if (!shouldSubmit) {
|
||||
return; // enter key wasn't pressed
|
||||
}
|
||||
this.onInvite(inputText);
|
||||
},
|
||||
|
||||
onClickInvite: function(ev) {
|
||||
this.setState({ editing: true });
|
||||
this.refs.invite.onClickDiv();
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
onPopulateInvite: function(e) {
|
||||
this.onInvite(this.refs.invite.getDOMNode().value);
|
||||
e.preventDefault();
|
||||
},
|
||||
|
||||
inviteTile: function() {
|
||||
@ -95,7 +82,9 @@ module.exports = React.createClass({
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<input className="mx_MemberList_invite" ref="invite" placeholder="Invite another user" onSubmit={this.onPopulateInvite}/>
|
||||
<form onSubmit={this.onPopulateInvite}>
|
||||
<input className="mx_MemberList_invite" ref="invite" placeholder="Invite another user"/>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user