Fix scrolling behaviour of filter dialog

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

@ -148,6 +148,7 @@ export class FileSearchComponent implements AfterViewChecked, OnInit {
const filterEntries = this.filters.map(f => f.clone()); const filterEntries = this.filters.map(f => f.clone());
const filterDialog = this.dialog.open(FilterDialogComponent, { const filterDialog = this.dialog.open(FilterDialogComponent, {
minWidth: "25vw", minWidth: "25vw",
height: "80vh",
data: { data: {
filterEntries, filterEntries,
availableTags: this.availableTags, availableTags: this.availableTags,

@ -1,13 +1,15 @@
<h1 mat-dialog-title>Filters</h1> <h1 mat-dialog-title>Filters</h1>
<div mat-dialog-content> <div mat-dialog-content fxLayout="column" class="filter-dialog-content">
<div fxFlex fxFlexFill class="filter-dialog-list">
<mat-list> <mat-list>
<mat-list-item class="filter-list-item" *ngFor="let expression of filters" [class.selected]="expression.selected"> <mat-list-item class="filter-list-item" *ngFor="let expression of filters" [class.selected]="expression.selected">
<app-tag-filter-list-item (querySelect)="this.addToSelection($event)" (queryUnselect)="this.removeFromSelection($event)" (removeClicked)="this.removeFilter($event)" <app-tag-filter-list-item (querySelect)="this.addToSelection($event)" (queryUnselect)="this.removeFromSelection($event)" (removeClicked)="this.removeFilter($event)"
(contextmenu)="contextMenu.onContextMenu($event)" [expression]="expression"></app-tag-filter-list-item> (contextmenu)="contextMenu.onContextMenu($event)" [expression]="expression"></app-tag-filter-list-item>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
<mat-divider></mat-divider> </div>
<app-tag-input class="tag-input" [allowNegation]="true" [availableTags]="this.availableTags" <mat-divider fxFlex="10px"></mat-divider>
<app-tag-input fxFlex="5em" class="tag-input" [allowNegation]="true" [availableTags]="this.availableTags"
(tagAdded)="this.addFilter($event)"></app-tag-input> (tagAdded)="this.addFilter($event)"></app-tag-input>
</div> </div>
<div class="dialog-actions" mat-dialog-actions> <div class="dialog-actions" mat-dialog-actions>

@ -26,3 +26,16 @@ app-tag-filter-list-item {
.selected { .selected {
background-color: #5c5c5c; background-color: #5c5c5c;
} }
.filter-dialog-content {
overflow: hidden;
height: 100%;
width: 100%;
margin: 0;
}
.filter-dialog-list {
overflow-y: auto;
height: 100%;
width: 100%;
}

Loading…
Cancel
Save