Skip to content

Commit

Permalink
Merge pull request #40867 from Expensify/rodrigo-fix-report-mention-s…
Browse files Browse the repository at this point in the history
…earch

Perform mention report search only in policy rooms
  • Loading branch information
pecanoro authored Apr 24, 2024
2 parents 08b7ff4 + 062def2 commit f508e2d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down

0 comments on commit f508e2d

Please sign in to comment.