Add invert action to filter context menu

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 3a461080ea
commit dff586bc10

@ -19,4 +19,5 @@
<app-context-menu #contextMenu>
<button mat-menu-item (click)="this.convertSelectionToOrExpression()">Copy to OR-Expression</button>
<button mat-menu-item (click)="this.convertSelectionToAndExpression()">Copy to AND-Expression</button>
<button mat-menu-item (click)="this.invertSelection()">Invert</button>
</app-context-menu>

@ -111,6 +111,10 @@ export class FilterDialogComponent {
this.unselectAll();
}
public invertSelection(): void {
this.selectedQueries.forEach(query => query.negate = !query.negate);
}
private removeFilterDuplicates() {
const filters = this.filters;
let newFilters: Selectable<FilterExpression>[] = [];

Loading…
Cancel
Save