Fix WebSPA pager display (#1629)
This commit is contained in:
parent
873cdf8cef
commit
68f5afd09c
@ -95,7 +95,7 @@ export class CatalogComponent implements OnInit {
|
||||
itemsPage : catalog.pageSize,
|
||||
totalItems : catalog.count,
|
||||
totalPages: Math.ceil(catalog.count / catalog.pageSize),
|
||||
items: catalog.pageSize
|
||||
items: catalog.data.length
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ export class Pager implements OnInit, OnChanges {
|
||||
|
||||
ngOnChanges() {
|
||||
if (this.model) {
|
||||
this.model.items = (this.model.itemsPage > this.model.totalItems) ? this.model.totalItems : this.model.itemsPage;
|
||||
|
||||
this.buttonStates.previousDisabled = (this.model.actualPage == 0);
|
||||
this.buttonStates.nextDisabled = (this.model.actualPage + 1 >= this.model.totalPages);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user