Skip to content

Commit

Permalink
[FIX] Member search not trimming search text (#3129)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ARKEOLOGIST and diegolmello authored May 26, 2021
1 parent 5c47724 commit c10bd5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/views/RoomMembersView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit c10bd5f

Please sign in to comment.