add paging for featured datasets tab (enermaps)
This commit is contained in:
parent
fc5fcfaede
commit
2d0893ff45
|
@ -36,10 +36,10 @@ import {StringUtils} from "../../string-utils.class";
|
|||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE">
|
||||
<search-result [properties]="properties"
|
||||
[results]="fetch.results"
|
||||
[status]="fetch.searchUtils.status"
|
||||
[type]="resultType" [showImpactFactors]="showImpactFactors" [showEnermaps]="showEnermaps">
|
||||
<search-result [properties]="properties"
|
||||
[results]="results"
|
||||
[status]="fetch.searchUtils.status"
|
||||
[type]="resultType" [showImpactFactors]="showImpactFactors" [showEnermaps]="showEnermaps">
|
||||
</search-result>
|
||||
|
||||
<!-- <div *ngIf="searchLinkToAdvancedPage && fetch.results?.length > 0" class="uk-text-right">-->
|
||||
|
@ -62,10 +62,15 @@ export class SearchTabComponent {
|
|||
@Input() showImpactFactors;
|
||||
@Input() customTitle;
|
||||
@Input() showEnermaps: boolean;
|
||||
@Input() currentPage: number = null;
|
||||
|
||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
|
||||
public getEntityName(entityType: string): string {
|
||||
return StringUtils.getEntityName(entityType, true);
|
||||
}
|
||||
|
||||
get results() {
|
||||
return this.currentPage ? this.fetch.results.slice((this.currentPage - 1) * this.searchNumber, this.currentPage * this.searchNumber) : this.fetch.results;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue