<div class="combobox" [class.active]="active">
  <button class="toggle" (click)="toggleActivity()">
    <div class="caption" *ngIf="value">{{caption}}</div>
    <div class="filter">
      <input type="text" #searchInput (click)="$event.stopPropagation()" (input)="onInput($event)" (keydown.escape)="active = false" />
    </div>
    <ico ico="drop_down_24" [rotate]="active?180:0" [color]="active?'var(--prime)':null"></ico>
  </button>
  <div class="dropdown">
    <ul>
      <li *ngFor="let option of options; let i = index;">
        <div class="title" (click)="toggleValue(option)" [class.selected]="isSelected(option)">
          <p>{{option.caption || option.title || option.name}}</p>
          <p class="faded" *ngIf="option.subtitle">{{option.subtitle}}</p>
        </div>
      </li>
      
    </ul>
  </div>
</div>
<div class="empty-result" *ngIf="!options.length">Результатов не найдено, укажите менее строгий запрос</div>

