Focus on chat input area to enter text after file uploads on web app

This commit is contained in:
Debanjum Singh Solanky
2024-10-22 21:19:17 -07:00
parent c81e708833
commit a134cd835c
3 changed files with 12 additions and 2 deletions

View File

@@ -36,6 +36,8 @@ function ChatBodyData(props: ChatBodyDataProps) {
const [images, setImages] = useState<string[]>([]);
const [processingMessage, setProcessingMessage] = useState(false);
const [agentMetadata, setAgentMetadata] = useState<AgentData | null>(null);
const chatInputRef = useRef<HTMLTextAreaElement>(null);
const setQueryToProcess = props.setQueryToProcess;
const streamedMessages = props.streamedMessages;
@@ -114,6 +116,7 @@ function ChatBodyData(props: ChatBodyDataProps) {
agentColor={agentMetadata?.color}
isMobileWidth={props.isMobileWidth}
setUploadedFiles={props.setUploadedFiles}
ref={chatInputRef}
/>
</div>
</>