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

@ -10,7 +10,7 @@ import { SeriesAddedEvent } from '../_models/events/series-added-event';
import { Library } from '../_models/library';
import { Pagination } from '../_models/pagination';
import { Series } from '../_models/series';
import { SeriesFilter } from '../_models/series-filter';
import { FilterEvent, SeriesFilter } from '../_models/series-filter';
import { ActionItem, Action } from '../_services/action-factory.service';
import { ActionService } from '../_services/action.service';
import { MessageHubService } from '../_services/message-hub.service';
@ -105,9 +105,9 @@ export class AllSeriesComponent implements OnInit, OnDestroy {
}
}
updateFilter(data: SeriesFilter) {
this.filter = data;
if (this.pagination !== undefined && this.pagination !== null) {
updateFilter(data: FilterEvent) {
this.filter = data.filter;
if (this.pagination !== undefined && this.pagination !== null && !data.isFirst) {
this.pagination.currentPage = 1;
this.onPageChange(this.pagination);
} else {