diff options
4 files changed, 19 insertions, 4 deletions
diff --git a/webapp/components/add_users_to_team/add_users_to_team.jsx b/webapp/components/add_users_to_team/add_users_to_team.jsx index 19e0d674b..e3eb8477b 100644 --- a/webapp/components/add_users_to_team/add_users_to_team.jsx +++ b/webapp/components/add_users_to_team/add_users_to_team.jsx @@ -215,6 +215,11 @@ export default class AddUsersToTeam extends React.Component { /> ); + let users = []; + if (this.state.users) { + users = this.state.users.filter((user) => user.delete_at === 0); + } + return ( <Modal dialogClassName={'more-modal more-direct-channels'} @@ -238,7 +243,7 @@ export default class AddUsersToTeam extends React.Component { <Modal.Body> <MultiSelect key='addUsersToTeamKey' - options={this.state.users} + options={users} optionRenderer={this.renderOption} values={this.state.values} valueRenderer={this.renderValue} diff --git a/webapp/components/channel_invite_modal/channel_invite_modal.jsx b/webapp/components/channel_invite_modal/channel_invite_modal.jsx index d2fceb2c3..8b09a7496 100644 --- a/webapp/components/channel_invite_modal/channel_invite_modal.jsx +++ b/webapp/components/channel_invite_modal/channel_invite_modal.jsx @@ -143,13 +143,18 @@ export default class ChannelInviteModal extends React.Component { inviteError = (<label className='has-error control-label'>{this.state.inviteError}</label>); } + let users = []; + if (this.state.users) { + users = this.state.users.filter((user) => user.delete_at === 0); + } + let content; if (this.state.loading) { content = (<LoadingScreen/>); } else { content = ( <SearchableUserList - users={this.state.users} + users={users} usersPerPage={USERS_PER_PAGE} total={this.state.total} nextPage={this.nextPage} diff --git a/webapp/components/member_list_channel/member_list_channel.jsx b/webapp/components/member_list_channel/member_list_channel.jsx index f47f26cf6..272e210ce 100644 --- a/webapp/components/member_list_channel/member_list_channel.jsx +++ b/webapp/components/member_list_channel/member_list_channel.jsx @@ -146,7 +146,7 @@ export default class MemberListChannel extends React.Component { for (let i = 0; i < users.length; i++) { const user = users[i]; - if (teamMembers[user.id] && channelMembers[user.id]) { + if (teamMembers[user.id] && channelMembers[user.id] && user.delete_at === 0) { usersToDisplay.push(user); actionUserProps[user.id] = { channel: this.props.channel, diff --git a/webapp/components/more_direct_channels/more_direct_channels.jsx b/webapp/components/more_direct_channels/more_direct_channels.jsx index 705c1ac95..0e50eca72 100644 --- a/webapp/components/more_direct_channels/more_direct_channels.jsx +++ b/webapp/components/more_direct_channels/more_direct_channels.jsx @@ -292,6 +292,11 @@ export default class MoreDirectChannels extends React.Component { /> ); + let users = []; + if (this.state.users) { + users = this.state.users.filter((user) => user.delete_at === 0); + } + return ( <Modal dialogClassName={'more-modal more-direct-channels'} @@ -310,7 +315,7 @@ export default class MoreDirectChannels extends React.Component { <Modal.Body> <MultiSelect key='moreDirectChannelsList' - options={this.state.users} + options={users} optionRenderer={this.renderOption} values={this.state.values} valueRenderer={this.renderValue} |