diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js
index 6d4cf21f70..69dd6764a6 100644
--- a/src/components/views/dialogs/ChatInviteDialog.js
+++ b/src/components/views/dialogs/ChatInviteDialog.js
@@ -138,11 +138,16 @@ module.exports = React.createClass({
this.setState({ queryList: queryList });
},
- onDismissed: function() {
- this.setState({
- inviteList: [],
- queryList: [],
- });
+ onDismissed: function(index) {
+ var self = this;
+ return function() {
+ var inviteList = self.state.inviteList.slice();
+ inviteList.splice(index, 1);
+ self.setState({
+ inviteList: inviteList,
+ queryList: [],
+ });
+ }
},
onClick: function(index) {
@@ -234,9 +239,12 @@ module.exports = React.createClass({
var query;
if (this.state.inviteList.length > 0) {
var AddressTile = sdk.getComponent("elements.AddressTile");
- query = (
-
- );
+ query = [];
+ for (let i = 0; i < this.state.inviteList.length; i++) {
+ query.push(
+
+ );
+ }
} else {
query = (