[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 <diegolmello@gmail.com>
This commit is contained in:
Arkadyuti Bandyopadhyay 2021-05-27 02:44:42 +05:30 committed by GitHub
parent 5c4772427a
commit c10bd5fd93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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()));