From b79ceb82aa0d5e97a6bbfb02f0d536ba62e7ed07 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 19 Sep 2023 09:09:12 +0700 Subject: [PATCH 1/2] fix select show no result found --- src/pages/NewChatPage.js | 3 ++- .../MoneyRequestParticipantsSelector.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 9ff787ebe21b..3a8eb64957fb 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -199,8 +199,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.includes(searchTerm.trim().toLowerCase())), ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); From c30147c961061d99d2a1fb4cf35b35add6749cb9 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 19 Sep 2023 23:31:11 +0700 Subject: [PATCH 2/2] add lowercase --- .../MoneyRequestParticipantsSelector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index 3a8eb64957fb..d179735ac687 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -201,7 +201,7 @@ function MoneyRequestParticipantsSelector({ Boolean(newChatOptions.userToInvite), searchTerm.trim(), maxParticipantsReached, - _.some(participants, (participant) => participant.login.includes(searchTerm.trim().toLowerCase())), + _.some(participants, (participant) => participant.login.toLowerCase().includes(searchTerm.trim().toLowerCase())), ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails);