mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
update pagination on count 0 (#3228)
This commit is contained in:
committed by
Eugenio Romano
parent
8f27cd1758
commit
95a2a54017
@@ -87,6 +87,11 @@ export class PaginationComponent implements OnInit, OnDestroy, PaginationCompone
|
||||
ngOnInit() {
|
||||
if (this.target) {
|
||||
this.paginationSubscription = this.target.pagination.subscribe((pagination: PaginationModel) => {
|
||||
|
||||
if (pagination.count === 0 && !this.isFirstPage) {
|
||||
this.goPrevious();
|
||||
}
|
||||
|
||||
this.pagination = pagination;
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
|
Reference in New Issue
Block a user