diff --git a/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts b/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts index e64b48ab..d8de3651 100644 --- a/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts +++ b/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts @@ -195,11 +195,19 @@ export class AutocompleteTextareaComponent } if (changes.value && !this.value && this.messageInput) { this.messageInput.nativeElement.style.height = 'auto'; + this.chatClientService?.chatClient?.logger?.( + 'info', + '[Autocomplete textarea] Value reset, adjusting textarea height to auto' + ); this.updateMentionedUsersFromText(); } } ngAfterViewInit(): void { + this.chatClientService?.chatClient?.logger?.( + 'info', + '[Autocomplete textarea] View inited' + ); if (this.messageInput.nativeElement.scrollHeight > 0) { this.adjustTextareaHeight(); } @@ -233,6 +241,10 @@ export class AutocompleteTextareaComponent } inputChanged() { + this.chatClientService?.chatClient?.logger?.( + 'info', + '[Autocomplete textarea] Input changed' + ); this.valueChange.emit(this.messageInput.nativeElement.value); this.adjustTextareaHeight(); } @@ -251,6 +263,10 @@ export class AutocompleteTextareaComponent private adjustTextareaHeight() { if (this.themeVersion === '2') { + this.chatClientService?.chatClient?.logger?.( + 'info', + `[Autocomplete textarea] Textarea height set from ${this.messageInput.nativeElement.style.height} to ${this.messageInput.nativeElement.scrollHeight}px` + ); this.messageInput.nativeElement.style.height = ''; this.messageInput.nativeElement.style.height = `${this.messageInput.nativeElement.scrollHeight}px`; }