Skip to content

Commit

Permalink
linagora#1960 Filter results in channel participants popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane VIEIRA committed Mar 11, 2022
1 parent 380f169 commit c03fb81
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ const ChannelMembersList = (props: PropsType) => {
channelId: id || '',
});

const channelMembersUid = channelMembers.map(member => member.user_id || '');
const { search: searchUserList, result } = useSearchUserList({
scope: 'workspace',
});

const channelMembersUid = channelMembers.map(member => member.user_id || '');

useUsersListener(channelMembersUid);
const filterSearch = (res: UserType[]) => {
const addedUsers: UserType[] = res
Expand Down Expand Up @@ -144,6 +146,7 @@ const ChannelMembersList = (props: PropsType) => {
)}
{result
.map(u => u.id)
.filter(userId => !channelMembersUid.includes(userId || ''))
.map(userId =>
props.channel.id ? (
<div key={userId} className="x-margin" style={{ marginTop: 8 }}>
Expand Down

0 comments on commit c03fb81

Please sign in to comment.