You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows to prevent triggering the `channel.watch()` (triggers channel query HTTP request) call when mounting the `Channel` component (the default behavior) with uninitialized (`channel.initialized`) `Channel` instance. That means that no channel data from the back-end will be received neither channel WS events will be delivered to the client. Preventing to initialize the channel on mount allows us to postpone the channel creation in the Stream's DB to a later point in time, for example, when a first message is sent:
Copy file name to clipboardExpand all lines: src/components/Channel/Channel.tsx
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,8 @@ export type ChannelProps<
152
152
EmptyPlaceholder?: React.ReactElement;
153
153
/** Custom UI component to be displayed when the `MessageList` is empty, defaults to and accepts same props as: [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx) */
* Allows to prevent triggering the channel.watch() call when mounting the component.
175
+
* That means that no channel data from the back-end will be received neither channel WS events will be delivered to the client.
176
+
* Preventing to initialize the channel on mount allows us to postpone the channel creation to a later point in time.
177
+
*/
178
+
initializeOnMount?: boolean;
172
179
/** Custom UI component handling how the message input is rendered, defaults to and accepts the same props as [MessageInputFlat](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/MessageInputFlat.tsx) */
Copy file name to clipboardExpand all lines: src/components/MessageInput/MessageInput.tsx
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ export type MessageInputProps<
61
61
getDefaultValue?: ()=>string|string[];
62
62
/** If true, expands the text input vertically for new lines */
63
63
grow?: boolean;
64
+
/** Allows to hide MessageInput's send button. */
65
+
hideSendButton?: boolean;
64
66
/** Custom UI component handling how the message input is rendered, defaults to and accepts the same props as [MessageInputFlat](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/MessageInputFlat.tsx) */
0 commit comments