Skip to content

Commit

Permalink
Fix message input not updating on chat list switch (mckaywrigley#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
liby authored Apr 18, 2023
1 parent cb922d9 commit 862f74a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/Chat/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 862f74a

Please sign in to comment.