[FIX] Unable to search non-latin alphabet names on members list (#3039)

* Add search by name in members list

* Update RoomMembersView search

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Gerzon Z 2021-04-07 15:15:05 -04:00 committed by GitHub
parent 23a7f0f689
commit 5a800fe21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.username.toLowerCase().match(text.toLowerCase()) || m.name.toLowerCase().match(text.toLowerCase()));
}
this.setState({ filtering: !!text, membersFiltered });
})