Filter fixes
This commit is contained in:
parent
db8827e381
commit
b03607dd1f
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div *ngFor="let filter of filters">
|
||||
<div class="mat-menu-item flex" (click)="toggleFilterExpanded($event, filter)">
|
||||
<div class="arrow-wrapper" *ngIf="filter.filters">
|
||||
<div class="arrow-wrapper" *ngIf="filter.filters && filter.filters.length">
|
||||
<mat-icon *ngIf="filter.expanded" svgIcon="red:arrow-down" color="accent">
|
||||
</mat-icon>
|
||||
<mat-icon *ngIf="!filter.expanded" color="accent" svgIcon="red:arrow-right">
|
||||
|
||||
@ -7,7 +7,6 @@ import {
|
||||
SimpleChanges,
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
import { ManualRedactions } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '../../state/app-state.service';
|
||||
import { FilterModel } from './model/filter.model';
|
||||
import { handleCheckedValue } from './utils/filter-utils';
|
||||
@ -42,11 +41,11 @@ export class FilterComponent implements OnChanges {
|
||||
}
|
||||
|
||||
activateAllFilters() {
|
||||
this._setAlLFilters(true);
|
||||
this._setAllFilters(true);
|
||||
}
|
||||
|
||||
deactivateAllFilters() {
|
||||
this._setAlLFilters(false);
|
||||
this._setAllFilters(false);
|
||||
}
|
||||
|
||||
get hasActiveFilters(): boolean {
|
||||
@ -67,10 +66,10 @@ export class FilterComponent implements OnChanges {
|
||||
filter.expanded = !filter.expanded;
|
||||
}
|
||||
|
||||
private _setAlLFilters(value: boolean) {
|
||||
private _setAllFilters(value: boolean) {
|
||||
this.filters?.forEach((f) => {
|
||||
f.checked = value;
|
||||
f.indeterminate = value;
|
||||
f.indeterminate = false;
|
||||
f.filters.forEach((ff) => {
|
||||
ff.checked = value;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user