Skip to content

Commit 5b25ba7

Browse files
committed
add drop container to sender
1 parent 832cd37 commit 5b25ba7

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

react/src/components/Chat/ChatInput.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ChatInput: React.FC<ChatInputProps> = ({
5252

5353
const [isOpenAttachments, setIsOpenAttachments] = useState(false);
5454
const [files, setFiles] = useState<AttachmentsProps['items']>([]);
55-
const cardRef = useRef<HTMLDivElement>(null);
55+
const dropContainerRef = useRef<HTMLDivElement>(null);
5656

5757
const [synchronizedMessage, setSynchronizedMessage] = useAtom(
5858
synchronizedMessageState,
@@ -197,14 +197,19 @@ const ChatInput: React.FC<ChatInputProps> = ({
197197

198198
return (
199199
<>
200-
<Flex style={ChatInputStyle} direction="column" align="center">
200+
<Flex
201+
style={ChatInputStyle}
202+
direction="column"
203+
align="center"
204+
ref={dropContainerRef}
205+
>
201206
<ChatSender
202207
placeholder="Say something..."
203208
autoFocus
204209
value={input}
205210
items={files}
206211
openAttachment={isOpenAttachments}
207-
dropContainerRef={cardRef}
212+
dropContainerRef={dropContainerRef}
208213
loading={isLoading}
209214
onInputChange={handleInputChange}
210215
onInputSubmit={handleInputSubmit}

0 commit comments

Comments
 (0)