From 2a0ea2923912a3c440d6be4fa6c91a9aec108b4a Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Tue, 6 Apr 2021 11:56:37 -0400 Subject: [PATCH 1/2] Add search by name in members list --- app/views/RoomMembersView/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js index 4caa033812..a7f8df59bf 100644 --- a/app/views/RoomMembersView/index.js +++ b/app/views/RoomMembersView/index.js @@ -139,7 +139,7 @@ class RoomMembersView extends React.Component { let membersFiltered = []; if (members && members.length > 0 && text) { - membersFiltered = members.filter(m => m.username.toLowerCase().match(text.toLowerCase())); + membersFiltered = members.filter(m => m.name.toLowerCase().match(text.toLowerCase()) || m.username.toLowerCase().match(text.toLowerCase())); } this.setState({ filtering: !!text, membersFiltered }); }) From e3673c6d5e4c0bb6d9299884c32b083aab9d1a13 Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Tue, 6 Apr 2021 12:09:03 -0400 Subject: [PATCH 2/2] Update RoomMembersView search --- app/views/RoomMembersView/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js index a7f8df59bf..9a47b60f74 100644 --- a/app/views/RoomMembersView/index.js +++ b/app/views/RoomMembersView/index.js @@ -139,7 +139,7 @@ class RoomMembersView extends React.Component { let membersFiltered = []; if (members && members.length > 0 && text) { - membersFiltered = members.filter(m => m.name.toLowerCase().match(text.toLowerCase()) || m.username.toLowerCase().match(text.toLowerCase())); + membersFiltered = members.filter(m => m.username.toLowerCase().match(text.toLowerCase()) || m.name.toLowerCase().match(text.toLowerCase())); } this.setState({ filtering: !!text, membersFiltered }); })