From 062def2a0b4b25ad6850a6492db42a0332d9a1c1 Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Wed, 24 Apr 2024 08:14:03 -0300 Subject: [PATCH] performing search only in policy rooms --- .../home/report/ReportActionCompose/SuggestionMention.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx b/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx index 37032a2550fe..08b8ba572b3e 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx +++ b/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx @@ -86,10 +86,10 @@ function SuggestionMention( const debouncedSearchInServer = useDebounce( useCallback(() => { const foundSuggestionsCount = suggestionValues.suggestedMentions.length; - if (suggestionValues.prefixType === '#' && foundSuggestionsCount < 5) { + if (suggestionValues.prefixType === '#' && foundSuggestionsCount < 5 && isGroupPolicyReport) { ReportUserActions.searchInServer(value, policyID); } - }, [suggestionValues.suggestedMentions.length, suggestionValues.prefixType, policyID, value]), + }, [suggestionValues.suggestedMentions.length, suggestionValues.prefixType, policyID, value, isGroupPolicyReport]), CONST.TIMING.SEARCH_OPTION_LIST_DEBOUNCE_TIME, );