GetStream / stream-chat-react

React Chat SDK ➜ Stream Chat 💬
https://getstream.io/chat/sdk/react/
Other
702 stars 273 forks source link

can you make it possible to provide MessageUpdate? #384

Closed plandem closed 3 years ago

plandem commented 4 years ago

Right now we can provide component for a new message via MessageInput, but it's not possible to provide a MessageUpdate, since it's hardcoded inside of all these MessageSimple/MessageLivestream and etc.

jaapbakker88 commented 4 years ago

@plandem, do you mean the MessageInput for editing messages is not overridable?

plandem commented 4 years ago

yes. E.g. it's hardcoded here: https://github.com/GetStream/stream-chat-react/blob/8514804c9af8c9755f0e1a7620a8efab7feb80fc/src/components/Message/MessageLivestream.js#L375

plandem commented 4 years ago

I don't see a way how to provide MessageUpdate without creating own MessageView.

<Chat client={chat} theme="livestream">
          <Channel channel={channel}>
              <ChannelHeader live/>
              <MessageList Message={MessageView} dateSeparator={DateSeparator} />
              <MessageInput Input={MessageCreate} disabled={!isOnline} />
          </Channel>
</Chat>

also dateSeparator is kinda not consistent with other names for passing components like Message, Input and etc. It's camelCase.

jaapbakker88 commented 4 years ago

@plandem right now we don't support this, but I'll add it to the backlog as well. As the naming convention goes, you're right, we'll update it soon and will deprecate this old one.

DanC5 commented 3 years ago

@plandem sorry for the delay, but the EditMessageForm can now be overridden with the EditMessageInput prop on your message UI component, https://github.com/GetStream/stream-chat-react/releases/tag/v3.4.5