diff --git a/src/components/Chat/ChatContent/Message/MessageContent.tsx b/src/components/Chat/ChatContent/Message/MessageContent.tsx index e818d88..a9d9502 100644 --- a/src/components/Chat/ChatContent/Message/MessageContent.tsx +++ b/src/components/Chat/ChatContent/Message/MessageContent.tsx @@ -254,15 +254,25 @@ const EditView = ({ ]); const [_content, _setContent] = useState(content); + const textareaRef = React.createRef(); + + const handleInput = (e: React.ChangeEvent) => { + if (textareaRef.current) { + textareaRef.current.style.height = 'auto'; + textareaRef.current.style.height = `${e.target.scrollHeight}px`; + } + }; return ( <>