Fix message input not updating on chat list switch (#590)
This commit is contained in:
parent
cb922d9dc6
commit
862f74a332
|
@ -134,6 +134,11 @@ export const ChatMessage: FC<Props> = memo(({ message, messageIndex }) => {
|
|||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setMessageContent(message.content);
|
||||
}, [message.content]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.style.height = 'inherit';
|
||||
|
|
Loading…
Reference in New Issue