mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-07 02:01:30 +03:00
Filter text in archive viewer now resets when changing other filters
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<mat-form-field class="filter">
|
<mat-form-field class="filter">
|
||||||
<mat-icon matPrefix>search</mat-icon>
|
<mat-icon matPrefix>search</mat-icon>
|
||||||
<mat-label i18n="Filter">Filter</mat-label>
|
<mat-label i18n="Filter">Filter</mat-label>
|
||||||
<input matInput (keyup)="applyFilter($event)" #input>
|
<input matInput [(ngModel)]="text_filter" (keyup)="applyFilter($event)" #input>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<div [hidden]="!(archives && archives.length > 0)">
|
<div [hidden]="!(archives && archives.length > 0)">
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export class ArchiveViewerComponent {
|
|||||||
// general
|
// general
|
||||||
archives = null;
|
archives = null;
|
||||||
archives_retrieved = false;
|
archives_retrieved = false;
|
||||||
|
text_filter = '';
|
||||||
sub_id = 'none';
|
sub_id = 'none';
|
||||||
upload_sub_id = 'none';
|
upload_sub_id = 'none';
|
||||||
type: FileType | 'both' = 'both';
|
type: FileType | 'both' = 'both';
|
||||||
@@ -78,11 +79,15 @@ export class ArchiveViewerComponent {
|
|||||||
|
|
||||||
typeFilterSelectionChanged(value): void {
|
typeFilterSelectionChanged(value): void {
|
||||||
this.type = value;
|
this.type = value;
|
||||||
|
this.dataSource.filter = '';
|
||||||
|
this.text_filter = '';
|
||||||
this.getArchives();
|
this.getArchives();
|
||||||
}
|
}
|
||||||
|
|
||||||
subFilterSelectionChanged(value): void {
|
subFilterSelectionChanged(value): void {
|
||||||
this.sub_id = value;
|
this.sub_id = value;
|
||||||
|
this.dataSource.filter = '';
|
||||||
|
this.text_filter = '';
|
||||||
if (this.sub_id !== 'none') {
|
if (this.sub_id !== 'none') {
|
||||||
this.type = this.postsService.getSubscriptionByID(this.sub_id)['type'];
|
this.type = this.postsService.getSubscriptionByID(this.sub_id)['type'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user