Add Boolean Filter

master
Max 4 years ago
parent a4fa0b0599
commit 61bd7cc266

@ -124,3 +124,13 @@
[inputType]="column.type"
>
</app-cell>
<!-- Boolean Filter -->
<app-cell
*ngIf="column.type === 'Boolean'"
[editable]="true"
[(value)]="filter.value"
(valueChange)="newFilterValue()"
[inputType]="'Enum//Ja//Nein'"
>
</app-cell>

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

Loading…
Cancel
Save