[Monitor|Trunk]

Search stakeholders: create filters every time, and synchronize them with SP filters



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@60037 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-12-07 08:42:19 +00:00
parent 51ad3eb6ae
commit 48d529488c
1 changed files with 2 additions and 4 deletions

View File

@ -156,9 +156,7 @@ export class SearchStakeholdersComponent {
this.searchUtils.status = this.errorCodes.LOADING;
this.disableForms = true;
this.results = this.totalResults;
if (this.filters.length == 0 || (this.user && !this.userFilterLoaded)) {
this.filters = this.createFilters();
}
this.filters = this.createFilters();
this.searchUtils.totalResults = 0;
this.applyParams(params);
}
@ -194,7 +192,7 @@ export class SearchStakeholdersComponent {
this.checkFilters(params);
this.sort();
this.searchUtils.totalResults = this.results.length;
this.searchPage.prepareFiltersToShow(this.filters, this.searchUtils.totalResults);
this.filters = this.searchPage.prepareFiltersToShow(this.filters, this.searchUtils.totalResults);
this.results = this.results.slice((this.searchUtils.page - 1) * this.searchUtils.size, (this.searchUtils.page * this.searchUtils.size));
this.searchUtils.status = this.errorCodes.DONE;
if (this.searchUtils.totalResults == 0) {