У меня есть одно mat-select
выпадающее и одно input
поля.При нажатии button
данные отправляются.После отправки данных я хочу очистить поле ввода, но не хочу очищать выпадающий список mat-select
.Как я могу это сделать?
chat.component.html
<div>
<mat-form-field>
<mat-select placeholder="Select User" [(ngModel)]="userObject.userid"
name="userid" required>
<mat-option *ngFor="let userObj of userObj [value]="userObj.userid">
{{userObj.username}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Type Message" [(ngModel)]="userObject.chatmessage">
</mat-form-field>
<button mat-raised-button color="primary" (click)="sendMessage()">
SEND MESSAGE</button>
</div>