Cilibiu Bogdan 9b0db0a82e
[ADF-5213] Metadata - select list filter (#5961)
* select filter input component

* include theme

* add filter input

* show input conditionally

* convert value to string for d:int type values

* filter list options pipe

* add components to module

* convert int value to string

* i18n

* update tests

* tests

* update config

* remove unneeded decorator

* fix lint

* update schema

* remove filter pipe

* provide a filtered list
2020-08-09 23:35:46 +01:00

27 lines
1.3 KiB
HTML

<ng-container *ngIf="!property.isEmpty() || isEditable()">
<div [attr.data-automation-id]="'card-select-label-' + property.key"
class="adf-property-label">{{ property.label | translate }}</div>
<div class="adf-property-field">
<div *ngIf="!isEditable()"
class="adf-select-item-padding adf-property-value"
data-automation-class="read-only-value">{{ property.displayValue | async }}</div>
<div *ngIf="isEditable()">
<mat-form-field class="adf-select-item-padding-editable adf-property-value">
<mat-select [(value)]="value"
panelClass="adf-select-filter"
(selectionChange)="onChange($event)"
data-automation-class="select-box">
<adf-select-filter-input *ngIf="showInputFilter" (change)="onFilterInputChange($event)"></adf-select-filter-input>
<mat-option *ngIf="showNoneOption()">{{ 'CORE.CARDVIEW.NONE' | translate }}</mat-option>
<mat-option *ngFor="let option of getList() | async"
[value]="option.key">
{{ option.label | translate }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</ng-container>