From 9b125684ab330989e0569f13a976ccef30e41384 Mon Sep 17 00:00:00 2001 From: Prasanjeet-Microsoft Date: Tue, 17 Jun 2025 00:25:24 +0530 Subject: [PATCH] fixed - reset chat input character count on "New Topic" button click --- App/frontend-app/src/components/chat/chatRoom.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/App/frontend-app/src/components/chat/chatRoom.tsx b/App/frontend-app/src/components/chat/chatRoom.tsx index 737229c2..a0922db3 100644 --- a/App/frontend-app/src/components/chat/chatRoom.tsx +++ b/App/frontend-app/src/components/chat/chatRoom.tsx @@ -73,6 +73,7 @@ export function ChatRoom({ searchResultDocuments, selectedDocuments, chatWithDoc }); const [referencesForFeedbackForm, setReferencesForFeedbackForm] = useState([]); const [textAreaValue, setTextAreaValue] = useState(""); + const [textareaKey, setTextareaKey] = useState(0); const inputRef = useRef(null); const [allChunkTexts, setAllChunkTexts] = useState([]); @@ -568,12 +569,15 @@ export function ChatRoom({ searchResultDocuments, selectedDocuments, chatWithDoc setSelectedDocument([]); setIsLoading(false); setChatSessionId(null); + setTextAreaValue(""); + setTextareaKey(prev => prev + 1); }} > {t('components.chat.new-topic')}