diff --git a/src/pages/home/report/ReportActionCompose/SuggestionMention.js b/src/pages/home/report/ReportActionCompose/SuggestionMention.js index fea1f2e845a5..6c08b68cdc78 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionMention.js +++ b/src/pages/home/report/ReportActionCompose/SuggestionMention.js @@ -234,10 +234,7 @@ function SuggestionMention({ useEffect(() => { calculateMentionSuggestion(selection.end); - - // We want this hook to run only on selection change. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [selection]); + }, [selection, calculateMentionSuggestion]); const updateShouldShowSuggestionMenuToFalse = useCallback(() => { setSuggestionValues((prevState) => {