From c2ce7426c12f8d2adf1c75dd24161aa4ac6132b5 Mon Sep 17 00:00:00 2001 From: martincupela Date: Tue, 17 Feb 2026 08:42:28 +0100 Subject: [PATCH] fix: remove customMessageData from handleSubmit type declaration The arg customMessageData is not supported since v13.0.0 --- src/components/MessageInput/SendButton.tsx | 7 ++----- .../MessageInput/hooks/useMessageInputControls.ts | 8 ++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/MessageInput/SendButton.tsx b/src/components/MessageInput/SendButton.tsx index 21db71cff..2f4c8a871 100644 --- a/src/components/MessageInput/SendButton.tsx +++ b/src/components/MessageInput/SendButton.tsx @@ -1,15 +1,12 @@ import React from 'react'; import { SendIcon } from './icons'; import { useMessageComposerHasSendableData } from './hooks'; -import type { UpdatedMessage } from 'stream-chat'; import { useTranslationContext } from '../../context'; export type SendButtonProps = { - sendMessage: ( - event: React.BaseSyntheticEvent, - customMessageData?: Omit, - ) => void; + sendMessage: (event: React.BaseSyntheticEvent) => void; } & React.ComponentProps<'button'>; + export const SendButton = ({ sendMessage, ...rest }: SendButtonProps) => { const { t } = useTranslationContext(); const hasSendableData = useMessageComposerHasSendableData(); diff --git a/src/components/MessageInput/hooks/useMessageInputControls.ts b/src/components/MessageInput/hooks/useMessageInputControls.ts index 8f1382d99..1341e7846 100644 --- a/src/components/MessageInput/hooks/useMessageInputControls.ts +++ b/src/components/MessageInput/hooks/useMessageInputControls.ts @@ -2,16 +2,12 @@ import type React from 'react'; import { useTextareaRef } from './useTextareaRef'; import { useSubmitHandler } from './useSubmitHandler'; import { usePasteHandler } from './usePasteHandler'; -import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder'; import type { RecordingController } from '../../MediaRecorder/hooks/useMediaRecorder'; -import type { UpdatedMessage } from 'stream-chat'; +import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder'; import type { MessageInputProps } from '../MessageInput'; export type MessageInputHookProps = { - handleSubmit: ( - event?: React.BaseSyntheticEvent, - customMessageData?: Omit, - ) => void; + handleSubmit: (event?: React.BaseSyntheticEvent) => void; onPaste: (event: React.ClipboardEvent) => void; recordingController: RecordingController; textareaRef: React.MutableRefObject;