fix invites
This commit is contained in:
parent
13f3548057
commit
d8bc362a89
1 changed files with 6 additions and 17 deletions
|
@ -30,7 +30,6 @@ module.exports = React.createClass({
|
||||||
mixins: [MemberListController],
|
mixins: [MemberListController],
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return { editing: false };
|
|
||||||
},
|
},
|
||||||
|
|
||||||
memberSort: function(userIdA, userIdB) {
|
memberSort: function(userIdA, userIdB) {
|
||||||
|
@ -71,21 +70,9 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onPopulateInvite: function(inputText, shouldSubmit) {
|
onPopulateInvite: function(e) {
|
||||||
// reset back to placeholder
|
this.onInvite(this.refs.invite.getDOMNode().value);
|
||||||
this.refs.invite.setValue("Invite", false, true);
|
e.preventDefault();
|
||||||
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();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
inviteTile: function() {
|
inviteTile: function() {
|
||||||
|
@ -95,7 +82,9 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
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 a new issue