From 7fa980e5fc79d63eb4b47e7d929c1709c69383b7 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 21 Jan 2025 22:15:19 -0300 Subject: [PATCH] fix: Update memoization logic in ChatView component to prevent scroll bug (#5764) refactor: Update memoization logic in ChatView component Co-authored-by: Cristhian Zanforlin Lousa --- .../src/modals/IOModal/components/chatView/chat-view.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/modals/IOModal/components/chatView/chat-view.tsx b/src/frontend/src/modals/IOModal/components/chatView/chat-view.tsx index 49d9be259..a278d7587 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chat-view.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chat-view.tsx @@ -23,7 +23,8 @@ const MemoizedChatMessage = memo(ChatMessage, (prevProps, nextProps) => { prevProps.chat.id === nextProps.chat.id && prevProps.chat.session === nextProps.chat.session && prevProps.chat.content_blocks === nextProps.chat.content_blocks && - prevProps.chat.properties === nextProps.chat.properties + prevProps.chat.properties === nextProps.chat.properties && + prevProps.lastMessage === nextProps.lastMessage ); });