From 67ffe9609f6950f246bc6e955fa311b6a85b552a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 19 Mar 2023 18:03:44 -0500 Subject: [PATCH] ChatTextarea: pass ref to child Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1390 --- app/soapbox/features/chats/components/chat-textarea.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/soapbox/features/chats/components/chat-textarea.tsx b/app/soapbox/features/chats/components/chat-textarea.tsx index 111a4cdc9..f6ee67b93 100644 --- a/app/soapbox/features/chats/components/chat-textarea.tsx +++ b/app/soapbox/features/chats/components/chat-textarea.tsx @@ -14,13 +14,13 @@ interface IChatTextarea extends React.ComponentProps { } /** Custom textarea for chats. */ -const ChatTextarea: React.FC = ({ +const ChatTextarea: React.FC = React.forwardRef(({ attachments, onDeleteAttachment, uploadCount = 0, uploadProgress = 0, ...rest -}) => { +}, ref) => { const isUploading = uploadCount > 0; const handleDeleteAttachment = (i: number) => { @@ -64,9 +64,9 @@ const ChatTextarea: React.FC = ({ )} -