From c10bd5fd9332bcb76f6e04e3eaa088149fa25837 Mon Sep 17 00:00:00 2001 From: Arkadyuti Bandyopadhyay Date: Thu, 27 May 2021 02:44:42 +0530 Subject: [PATCH] [FIX] Member search not trimming search text (#3129) * Fixed logout toast bug for the iOS * Removing callToAction and replacing with confirmationText * Handling member search with spaces to the left and right of name/username * Changing location of string trimmer Co-authored-by: Diego Mello --- app/views/RoomMembersView/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js index 59d298d94..5819cf512 100644 --- a/app/views/RoomMembersView/index.js +++ b/app/views/RoomMembersView/index.js @@ -150,6 +150,7 @@ class RoomMembersView extends React.Component { onSearchChangeText = protectedFunction((text) => { const { members } = this.state; let membersFiltered = []; + text = text.trim(); if (members && members.length > 0 && text) { membersFiltered = members.filter(m => m.username.toLowerCase().match(text.toLowerCase()) || m.name.toLowerCase().match(text.toLowerCase()));