Skip to content

Commit 3334143

Browse files
committed
update docs comment
1 parent b8e03ec commit 3334143

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

projects/stream-chat-angular/src/lib/message-input/message-input.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,16 @@ export class MessageInputComponent
126126
}>();
127127
/**
128128
* Emits the messsage draft whenever the composed message changes.
129-
* - If the user clears the message input, or sends the message, undefined is emitted.
130-
* - If active channel changes, nothing is emitted.
129+
* - If the user clears the message input, or sends the message, undefined is emitted.
130+
* - If active channel changes, nothing is emitted.
131131
*
132132
* To save and fetch message drafts, you can use the [Stream message drafts API](https://getstream.io/chat/docs/javascript/drafts/).
133133
*
134134
* Message draft only works for new messages, nothing is emitted when input is in edit mode (if `message` input is set).
135+
*
136+
* To load a message draft into the input, use the `loadDraft` method.
137+
* - If channel id doesn't match the active channel id, the draft is ignored.
138+
* - If a thread message is loaded, and the input isn't in thread mode or parent ids don't match, the draft is ignored.
135139
*/
136140
@Output() readonly messageDraftChange = new EventEmitter<
137141
DraftMessagePayload | undefined

0 commit comments

Comments
 (0)