feat: implement a search for professors

This commit is contained in:
2024-02-16 17:50:58 +03:00
parent d9764bfc0e
commit 967f5572fa
3 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<div class="search-content">
@if (teachers.length === 0) {
<app-data-spinner/>
} @else {
<mat-form-field color="accent" style="width: 100%;">
<input type="text" placeholder="Поиск..." matInput [formControl]="teacherControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="onOptionSelected($event)"
[autoActiveFirstOption]="false" [hideSingleSelectionIndicator]="true">
@for (option of filteredTeachers | async; track option) {
<mat-option [value]="option.id">
{{ option.name }}
</mat-option>
}
</mat-autocomplete>
</mat-form-field>
}
</div>