From 2027ed9f493893d13363fab630c578eb431fed00 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 8 Feb 2016 15:21:23 +0000 Subject: [PATCH] Fix bug where clicking on the email tile didn't work --- src/components/views/rooms/InviteMemberList.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/views/rooms/InviteMemberList.js b/src/components/views/rooms/InviteMemberList.js index a15ffa1ae8..8bad76b7ba 100644 --- a/src/components/views/rooms/InviteMemberList.js +++ b/src/components/views/rooms/InviteMemberList.js @@ -35,10 +35,6 @@ module.exports = React.createClass({ }; }, - getInitialState: function() { - return {}; - }, - componentWillMount: function() { this._room = MatrixClientPeg.get().getRoom(this.props.roomId); this._emailEntity = null; @@ -49,10 +45,14 @@ module.exports = React.createClass({ this._userList = MatrixClientPeg.get().getUsers().filter((u) => { return !this._room.hasMembershipState(u.userId, "join"); }); - console.log("%s users", this._userList.length); + }, + + onInvite: function(ev) { + this.props.onInvite(this._input); }, onSearchQueryChanged: function(input) { + this._input = input; var EntityTile = sdk.getComponent("rooms.EntityTile"); var BaseAvatar = sdk.getComponent("avatars.BaseAvatar"); @@ -68,7 +68,7 @@ module.exports = React.createClass({ } className="mx_EntityTile_invitePlaceholder" - presenceState="online" onClick={this.props.onInvite} name={label} />, + presenceState="online" onClick={this.onInvite} name={label} />, function(query) { return true; // always show this }