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:
Robbie Davis 2022-01-26 18:54:35 -05:00 committed by GitHub
parent 480cd94ab5
commit ea9f59320e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 50 deletions

View file

@ -13,7 +13,7 @@ import { CollectionTag } from 'src/app/_models/collection-tag';
import { SeriesAddedToCollectionEvent } from 'src/app/_models/events/series-added-to-collection-event';
import { Pagination } from 'src/app/_models/pagination';
import { Series } from 'src/app/_models/series';
import { SeriesFilter } from 'src/app/_models/series-filter';
import { FilterEvent, SeriesFilter } from 'src/app/_models/series-filter';
import { AccountService } from 'src/app/_services/account.service';
import { Action, ActionFactoryService, ActionItem } from 'src/app/_services/action-factory.service';
import { ActionService } from 'src/app/_services/action.service';
@ -175,9 +175,9 @@ export class CollectionDetailComponent implements OnInit, OnDestroy {
});
}
updateFilter(data: SeriesFilter) {
this.filter = data;
if (this.seriesPagination !== undefined && this.seriesPagination !== null) {
updateFilter(data: FilterEvent) {
this.filter = data.filter;
if (this.seriesPagination !== undefined && this.seriesPagination !== null && !data.isFirst) {
this.seriesPagination.currentPage = 1;
this.onPageChange(this.seriesPagination);
} else {