Skip to content

Commit 4ade2fd

Browse files
committed
fix: rebuild textarea when switching between enabled/disabled channels
1 parent 8bfb6cd commit 4ade2fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,15 @@ export class MessageInputComponent
408408
}
409409

410410
private initTextarea() {
411+
// cleanup previously built textarea
412+
if (!this.canSendMessages) {
413+
this.textareaRef = undefined;
414+
}
415+
411416
if (!this.canSendMessages || this.textareaRef || !this.textareaAnchor) {
412417
return;
413418
}
419+
414420
const componentFactory =
415421
this.componentFactoryResolver.resolveComponentFactory(this.textareaType);
416422
this.textareaRef =

0 commit comments

Comments
 (0)