From 0ed8056da3e744d7ba829b19977b1d028ed07266 Mon Sep 17 00:00:00 2001 From: Flavien David Date: Fri, 22 Dec 2023 13:11:56 +0100 Subject: [PATCH] Focus editor after input file loaded --- .../assistant/conversation/input_bar/InputBarContainer.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/front/components/assistant/conversation/input_bar/InputBarContainer.tsx b/front/components/assistant/conversation/input_bar/InputBarContainer.tsx index 6475e8af55d1..56320e6c67bb 100644 --- a/front/components/assistant/conversation/input_bar/InputBarContainer.tsx +++ b/front/components/assistant/conversation/input_bar/InputBarContainer.tsx @@ -27,7 +27,7 @@ export interface InputBarContainerProps { agentConfigurations: AgentConfigurationType[]; disableAttachment: boolean; onEnterKeyDown: CustomEditorProps["onEnterKeyDown"]; - onInputFileChange: (e: React.ChangeEvent) => void; + onInputFileChange: (e: React.ChangeEvent) => Promise; owner: WorkspaceType; selectedAssistant: AgentMention | null; stickyMentions: AgentMention[] | undefined; @@ -97,7 +97,10 @@ const InputBarContainer = ({
{ + await onInputFileChange(e); + editorService.focusEnd(); + }} ref={fileInputRef} style={{ display: "none" }} type="file"