[Connect|Trunk]
Communities search: fix issue with filters: recreate the static filters every time, keep them synchronize between components git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@60015 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
a41adbcab7
commit
b873aebcee
|
@ -178,9 +178,7 @@ export class SearchCommunitiesComponent {
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
this.disableForms = true;
|
this.disableForms = true;
|
||||||
this.results = this.totalResults;
|
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.searchUtils.totalResults = 0;
|
||||||
this.applyParams(params);
|
this.applyParams(params);
|
||||||
}
|
}
|
||||||
|
@ -224,7 +222,7 @@ export class SearchCommunitiesComponent {
|
||||||
this.checkFilters(params);
|
this.checkFilters(params);
|
||||||
this.sort();
|
this.sort();
|
||||||
this.searchUtils.totalResults = this.results.length;
|
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.results = this.results.slice((this.searchUtils.page - 1) * this.searchUtils.size, (this.searchUtils.page * this.searchUtils.size));
|
||||||
this.searchUtils.status = this.errorCodes.DONE;
|
this.searchUtils.status = this.errorCodes.DONE;
|
||||||
if (this.searchUtils.totalResults == 0) {
|
if (this.searchUtils.totalResults == 0) {
|
||||||
|
|
Loading…
Reference in New Issue