From c044a1c94734c6418420b977ca21acc6314c0c5a Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:57:50 -0300 Subject: [PATCH] fix: clear chat input when sending from play button (#5071) Fix newChatView to clear chat input if the component runs before --- .../src/modals/IOModal/components/chatView/newChatView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx b/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx index c04670b3f..31b746695 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx @@ -85,6 +85,7 @@ export default function ChatView({ if (finalChatHistory.length === 0 && !lockChat && chatInputNode) setChatValue(chatInputNode.data.node.template["input_value"].value ?? ""); + else setChatValue(""); setChatHistory(finalChatHistory); }, [flowPool, messages, visibleSession]);