@@ -12,6 +12,8 @@ import {
1212} from '../../context/ComponentContext' ;
1313import { MessageInputContextProvider } from '../../context/MessageInputContext' ;
1414import { DialogManagerProvider } from '../../context' ;
15+ import { useRegisterDropHandlers } from './WithDragAndDropUpload' ;
16+ import { useStableId } from '../UtilityComponents/useStableId' ;
1517
1618import type { Channel , Message , SendFileAPIResponse } from 'stream-chat' ;
1719
@@ -26,7 +28,6 @@ import type {
2628} from '../../types/types' ;
2729import type { URLEnrichmentConfig } from './hooks/useLinkPreviews' ;
2830import type { CustomAudioRecordingConfig } from '../MediaRecorder' ;
29- import { useRegisterDropHandlers } from './WithDragAndDropUpload' ;
3031
3132export type EmojiSearchIndexResult = {
3233 id : string ;
@@ -174,10 +175,12 @@ const UnMemoizedMessageInput = <
174175 const { Input : ContextInput , TriggerProvider = DefaultTriggerProvider } =
175176 useComponentContext < StreamChatGenerics , V > ( 'MessageInput' ) ;
176177
178+ const id = useStableId ( ) ;
179+
177180 const Input = PropInput || ContextInput || MessageInputFlat ;
178181 const dialogManagerId = props . isThreadInput
179- ? ' message-input-dialog-manager-thread'
180- : ' message-input-dialog-manager' ;
182+ ? ` message-input-dialog-manager-thread- ${ id } `
183+ : ` message-input-dialog-manager- ${ id } ` ;
181184
182185 if ( dragAndDropWindow )
183186 return (
0 commit comments