[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:
parent
5c4772427a
commit
c10bd5fd93
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue