Commits
Nicolai Olsen authored da8d7d917a9
8 8 | disableOptionCentering |
9 9 | (opened)="handleSelectOpen()" |
10 10 | [panelClass]="'autocompletePanel'"> |
11 11 | <mat-option [value]="value" class="hidden">{{value}}</mat-option> |
12 12 | <div class="autocompleteInput"> |
13 13 | <button class="btn btn-search" type="button" (click)="focusAutocompleteInput()"> |
14 14 | <mat-icon class="search-icon" *ngIf="!sorServiceIsDoingLookup" svgIcon="ic-search-highlighted"></mat-icon> |
15 15 | <mat-icon class="search-icon" *ngIf="sorServiceIsDoingLookup" svgIcon="ic-search-faded"></mat-icon> |
16 16 | </button> |
17 17 | <input matInput #input class="mat-option" |
18 + | [ngClass]="{'displaying-results': autocompleteOptions.length > 0}" |
18 19 | [name]="name" |
19 20 | [required]="!(disabled || notRelevant)" |
20 21 | [type]="'text'" |
21 22 | [disabled]="disabled || notRelevant" |
22 23 | [value]="value" |
23 24 | (keydown)="handleAutocompleteInputKeydown($event)"> |
24 25 | <button class="btn btn-close" type="button" (click)="select.close()"> |
25 26 | <mat-icon svgIcon="ic-close-small"></mat-icon> |
26 27 | </button> |
27 28 | </div> |
28 - | <mat-option *ngFor="let autocompleteOption of autocompleteOptions" [value]="autocompleteOption"> |
29 - | {{autocompleteOption}} |
30 - | </mat-option> |
29 + | <mat-divider></mat-divider> |
30 + | <mat-option *ngFor="let autocompleteOption of autocompleteOptions" [value]="autocompleteOption"> |
31 + | {{autocompleteOption}} |
32 + | </mat-option> |
31 33 | </mat-select> |
32 34 | |
33 35 | </mat-form-field> |
34 36 | <div style="display: none"> |
35 37 | <ng-content></ng-content> |
36 38 | </div> |