From 07144eda6524341446784b1727ca64af3d23ec05 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 24 Sep 2026 15:30:06 +0000 Subject: [PATCH] Resolve react hooks `exhaustive-deps` JS lint warnings (#40686) --- app/javascript/mastodon/components/autosuggest_textarea.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/components/autosuggest_textarea.jsx b/app/javascript/mastodon/components/autosuggest_textarea.jsx index 6eabdbd9f56..61ead96c950 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.jsx +++ b/app/javascript/mastodon/components/autosuggest_textarea.jsx @@ -116,7 +116,7 @@ const AutosuggestTextarea = forwardRef(({ const closeMenu = useCallback((e) => { setSuggestionsHidden(true); onBlur?.(e); - }, [setSuggestionsHidden]); + }, [setSuggestionsHidden, onBlur]); const handleFocus = useCallback((e) => { onFocus?.(e); @@ -152,7 +152,7 @@ const AutosuggestTextarea = forwardRef(({ textareaRef.current.blur(); textareaRef.current.focus(); } - }, [lang]); + }, [lang, textareaRef]); const renderSuggestion = useCallback((suggestion, i) => { let inner, key; @@ -178,7 +178,7 @@ const AutosuggestTextarea = forwardRef(({ const handleRef = useCallback((element) => { textareaRef.current = element; setTextareaElement(element); - }, []); + }, [textareaRef]); return (