Skip to content

Commit

Permalink
Merge pull request #38327 from Expensify/rodrigo-fix-room-selected-op…
Browse files Browse the repository at this point in the history
…tions-filter

Fix room invite selected options filter
  • Loading branch information
rlinoz authored Mar 14, 2024
2 parents d4eaf4e + 77b6493 commit 0cbe01f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/RoomInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ function RoomInvitePage({betas, personalDetails, report, policies}: RoomInvitePa
const isOptionInPersonalDetails = invitePersonalDetails.some((personalDetail) => accountID && personalDetail?.accountID === accountID);
const parsedPhoneNumber = PhoneNumber.parsePhoneNumber(LoginUtils.appendCountryCode(Str.removeSMSDomain(searchTerm)));
const searchValue = parsedPhoneNumber.possible && parsedPhoneNumber.number ? parsedPhoneNumber.number.e164 : searchTerm.toLowerCase();
const isPartOfSearchTerm = option.text?.toLowerCase().includes(searchValue) ?? option.login?.toLowerCase().includes(searchValue);
return isPartOfSearchTerm ?? isOptionInPersonalDetails;
const isPartOfSearchTerm = (option.text?.toLowerCase() ?? '').includes(searchValue) || (option.login?.toLowerCase() ?? '').includes(searchValue);
return isPartOfSearchTerm || isOptionInPersonalDetails;
});
}
const filterSelectedOptionsFormatted = filterSelectedOptions.map((selectedOption) => OptionsListUtils.formatMemberForList(selectedOption));
Expand Down

0 comments on commit 0cbe01f

Please sign in to comment.