mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-30 09:22:32 -05:00
Resolve react hooks exhaustive-deps JS lint warnings (#40686)
This commit is contained in:
@@ -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 (
|
||||
<div className={classNames('autosuggest-textarea', className)}>
|
||||
|
||||
Reference in New Issue
Block a user