Fixed bug on chatinput

This commit is contained in:
Lucas Oliveira 2024-03-31 04:07:34 +03:00
commit 8642c451c7

View file

@ -26,7 +26,7 @@ export default function ChatInput({
}, [lockChat, inputRef]);
useEffect(() => {
if (inputRef.current) {
if (inputRef.current && inputRef.current.scrollHeight !== 0) {
inputRef.current.style.height = "inherit"; // Reset the height
inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; // Set it to the scrollHeight
}