special CSS class if pagination is empty (#2780)

This commit is contained in:
Denys Vuika
2017-12-13 14:50:35 +00:00
committed by Eugenio Romano
parent b3fb51e06d
commit 6b80969c37
2 changed files with 12 additions and 1 deletions

View File

@@ -24,7 +24,8 @@ import {
Output,
ViewEncapsulation,
ChangeDetectorRef,
OnDestroy
OnDestroy,
HostBinding
} from '@angular/core';
import { Pagination } from 'alfresco-js-api';
@@ -134,6 +135,11 @@ export class PaginationComponent implements OnInit, OnDestroy {
return this.pagination && this.pagination.count > 0;
}
@HostBinding('class.adf-pagination__empty')
get isEmpty(): boolean {
return !this.hasItems;
}
get range(): number[] {
const { skipCount, maxItems, totalItems } = this.pagination;
const { isLastPage } = this;