From 0674bea05e34e7af672a03bf5a8eac3d32361a2f Mon Sep 17 00:00:00 2001 From: Joel Bettner Date: Wed, 29 Nov 2023 16:28:31 -0700 Subject: [PATCH] Merge pull request #32227 from situchan/fix-32214 fix suggested user remains visible on mention (cherry picked from commit 7ede114255d65a5b1053d9aa0af976fa4401e233) --- src/pages/home/report/ReportActionCompose/SuggestionMention.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose/SuggestionMention.js b/src/pages/home/report/ReportActionCompose/SuggestionMention.js index 4aedc3e7737a..e55b96ad99f5 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionMention.js +++ b/src/pages/home/report/ReportActionCompose/SuggestionMention.js @@ -149,7 +149,8 @@ function SuggestionMention({ if (!detail.login || detail.isOptimisticPersonalDetail) { return false; } - if (searchValue && !`${detail.displayName} ${detail.login}`.toLowerCase().includes(searchValue.toLowerCase())) { + const displayText = detail.displayName === formatPhoneNumber(detail.login) ? detail.displayName : `${detail.displayName} ${detail.login}`; + if (searchValue && !displayText.toLowerCase().includes(searchValue.toLowerCase())) { return false; } return true;