diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index e72cb9a3f79b..edbae46a3207 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -55,8 +55,9 @@ function NewChatPage({betas, isGroupChat, personalDetails, reports, translate}) const headerMessage = OptionsListUtils.getHeaderMessage( filteredPersonalDetails.length + filteredRecentReports.length !== 0, Boolean(filteredUserToInvite), - searchTerm, + searchTerm.trim(), maxParticipantsReached, + _.some(selectedOptions, (participant) => participant.searchText.toLowerCase().includes(searchTerm.trim().toLowerCase())), ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index de223823c8f4..4f761e92eaf5 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -221,8 +221,9 @@ function MoneyRequestParticipantsSelector({ const headerMessage = OptionsListUtils.getHeaderMessage( newChatOptions.personalDetails.length + newChatOptions.recentReports.length !== 0, Boolean(newChatOptions.userToInvite), - searchTerm, + searchTerm.trim(), maxParticipantsReached, + _.some(participants, (participant) => participant.login.toLowerCase().includes(searchTerm.trim().toLowerCase())), ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails);