From f11a89c701f6cd0ba630808b71c5767be6fe4a06 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:03:54 -0300 Subject: [PATCH] fix: removed dependency from useEffect that causes chat input to be cleared (#7393) * Removed flowPool from dependencies of function that clears chat input * remove console.log --------- Co-authored-by: Cristhian Zanforlin Lousa --- .../IOModal/components/chatView/components/chat-view.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/modals/IOModal/components/chatView/components/chat-view.tsx b/src/frontend/src/modals/IOModal/components/chatView/components/chat-view.tsx index b92242fb9..08f715271 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/components/chat-view.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/components/chat-view.tsx @@ -1,9 +1,5 @@ import LangflowLogo from "@/assets/LangflowLogo.svg?react"; -import ForwardedIconComponent from "@/components/common/genericIconComponent"; -import { ProfileIcon } from "@/components/core/appHeaderComponent/components/ProfileIcon"; import { TextEffectPerChar } from "@/components/ui/textAnimation"; -import { CustomProfileIcon } from "@/customization/components/custom-profile-icon"; -import { ENABLE_DATASTAX_LANGFLOW } from "@/customization/feature-flags"; import { track } from "@/customization/utils/analytics"; import { useMessagesStore } from "@/stores/messagesStore"; import { useUtilityStore } from "@/stores/utilityStore"; @@ -114,12 +110,11 @@ export default function ChatView({ setChatValueStore( chatInputNode.data.node.template["input_value"].value ?? "", ); - } else { - isTabHidden ? setChatValueStore("") : null; } setChatHistory(finalChatHistory); - }, [flowPool, messages, visibleSession]); + }, [messages, visibleSession]); + useEffect(() => { if (messagesRef.current) { messagesRef.current.scrollTop = messagesRef.current.scrollHeight;