Add enum Filter

master
Max 4 years ago
parent 1ee312b070
commit a4fa0b0599

@ -51,6 +51,7 @@
[required]="required"
[disabled]="!editable"
>
<mat-option [value]="null"></mat-option>
<mat-option *ngFor="let option of enumValues" [value]="option">
{{ option }}
</mat-option>
@ -111,9 +112,7 @@
</mat-form-field>
<ng-template #nonEditableText>
<ng-container *ngFor="let link of value">
<a mat-button color="primary" [href]="link">{{
link
}}</a>
<a mat-button color="primary" [href]="link">{{ link }}</a>
</ng-container>
</ng-template>
</div>

@ -114,3 +114,13 @@
>
</app-date-range-cell>
</ng-container>
<!-- DateRange Filter -->
<app-cell
*ngIf="column.type.startsWith('Enum')"
[editable]="true"
[(value)]="filter.value"
(valueChange)="newFilterValue()"
[inputType]="column.type"
>
</app-cell>

@ -147,6 +147,10 @@ export function customTableFilterFunction(data: any, filter: any) {
return false;
}
}
// Enum Filter
if (filterElement.type.startsWith('Enum') && filterElement.value != null && filterElement.value !== data[filterElementName]) {
return false;
}
}
/*const b =
!filter.includesString ||

Loading…
Cancel
Save