Fixes filter application (#992)
* Fixes filter application # Fixed: - Fixed: Fixed an issue where pagination would not reset on filter application (develop) * Fixing up code * code fixes * When no user exists for an api key in Plugin controller, throw 401. * Cleaned up the code to remove the extra variable and make use of what we had already. * Fixed the broken build from last PR * Fixed a few places the code didn't get updated Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
This commit is contained in:
parent
480cd94ab5
commit
ea9f59320e
9 changed files with 35 additions and 50 deletions
|
|
@ -14,7 +14,7 @@ import { Language } from 'src/app/_models/metadata/language';
|
|||
import { PublicationStatusDto } from 'src/app/_models/metadata/publication-status-dto';
|
||||
import { Pagination } from 'src/app/_models/pagination';
|
||||
import { Person, PersonRole } from 'src/app/_models/person';
|
||||
import { FilterItem, mangaFormatFilters, SeriesFilter, SortField } from 'src/app/_models/series-filter';
|
||||
import { FilterEvent, FilterItem, mangaFormatFilters, SeriesFilter, SortField } from 'src/app/_models/series-filter';
|
||||
import { Tag } from 'src/app/_models/tag';
|
||||
import { ActionItem } from 'src/app/_services/action-factory.service';
|
||||
import { CollectionTagService } from 'src/app/_services/collection-tag.service';
|
||||
|
|
@ -69,7 +69,7 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
|
|||
@Input() filterSettings!: FilterSettings;
|
||||
@Output() itemClicked: EventEmitter<any> = new EventEmitter();
|
||||
@Output() pageChange: EventEmitter<Pagination> = new EventEmitter();
|
||||
@Output() applyFilter: EventEmitter<SeriesFilter> = new EventEmitter();
|
||||
@Output() applyFilter: EventEmitter<FilterEvent> = new EventEmitter();
|
||||
|
||||
@ContentChild('cardItem') itemTemplate!: TemplateRef<any>;
|
||||
|
||||
|
|
@ -99,6 +99,7 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
|
|||
|
||||
updateApplied: number = 0;
|
||||
|
||||
|
||||
private onDestory: Subject<void> = new Subject();
|
||||
|
||||
get PersonRole(): typeof PersonRole {
|
||||
|
|
@ -570,7 +571,7 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
apply() {
|
||||
this.applyFilter.emit(this.filter);
|
||||
this.applyFilter.emit({filter: this.filter, isFirst: this.updateApplied === 0});
|
||||
this.updateApplied++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue