From 89ac222a2bbe6c8672559fa229e4686430e688b4 Mon Sep 17 00:00:00 2001 From: Jakub Trzebiatowski Date: Wed, 4 Oct 2023 10:58:26 +0200 Subject: [PATCH] Revert "Handle suggestions only on selection change" This reverts commit a4f4a7708ba9c2ca7f2d03604c7962c4f3e69def. --- .../home/report/ReportActionCompose/SuggestionMention.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) => {