[ISSUE 212] fixed

This commit is contained in:
richard-loafle 2020-02-06 13:52:17 +09:00
parent 07e3f8125f
commit 0da7ff2af3
3 changed files with 3 additions and 7 deletions

View File

@ -471,7 +471,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
// Chat Formfield Clear.. // Chat Formfield Clear..
if (!!this.chatForm) { if (!!this.chatForm) {
this.chatForm.replyForm.reset(); this.chatForm.replyInput.nativeElement.value = '';
} }
} }

View File

@ -87,7 +87,6 @@
</div> </div>
<form <form
#replyForm="ngForm"
(ngSubmit)="onSend($event)" (ngSubmit)="onSend($event)"
(keydown.enter)="onSend($event)" (keydown.enter)="onSend($event)"
fxFlex fxFlex

View File

@ -37,9 +37,6 @@ export class FormComponent implements OnInit {
@Output() @Output()
clipboardPaste = new EventEmitter<ClipboardEvent>(); clipboardPaste = new EventEmitter<ClipboardEvent>();
@ViewChild('replyForm', { static: false })
replyForm: NgForm;
@ViewChild('replyInput', { static: false }) @ViewChild('replyInput', { static: false })
replyInput: ElementRef<HTMLTextAreaElement>; replyInput: ElementRef<HTMLTextAreaElement>;
@ -57,8 +54,8 @@ export class FormComponent implements OnInit {
onSend(event: Event) { onSend(event: Event) {
event.preventDefault(); event.preventDefault();
this.send.emit(this.replyForm.form.value.message); this.send.emit(this.replyInput.nativeElement.value);
this.replyForm.reset(); this.replyInput.nativeElement.value = '';
} }
onClickFileInput() { onClickFileInput() {