Fixed bug on chatinput
This commit is contained in:
parent
5d76735194
commit
8642c451c7
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ export default function ChatInput({
|
||||||
}, [lockChat, inputRef]);
|
}, [lockChat, inputRef]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (inputRef.current) {
|
if (inputRef.current && inputRef.current.scrollHeight !== 0) {
|
||||||
inputRef.current.style.height = "inherit"; // Reset the height
|
inputRef.current.style.height = "inherit"; // Reset the height
|
||||||
inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; // Set it to the scrollHeight
|
inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; // Set it to the scrollHeight
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue