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
|
|
@ -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 { Action, ActionFactoryService, ActionItem } from '../_services/action-factory.service';
|
||||
import { ActionService } from '../_services/action.service';
|
||||
import { LibraryService } from '../_services/library.service';
|
||||
|
|
@ -138,10 +138,10 @@ export class LibraryDetailComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
updateFilter(data: SeriesFilter) {
|
||||
this.filter = data;
|
||||
updateFilter(event: FilterEvent) {
|
||||
this.filter = event.filter;
|
||||
const page = this.getPage();
|
||||
if (page === undefined || page === null) {
|
||||
if (page === undefined || page === null || !event.isFirst) {
|
||||
this.pagination.currentPage = 1;
|
||||
this.onPageChange(this.pagination);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue