Browse Source

Fix WebSPA pager display

pull/1629/head
Stefan Negulescu 3 years ago
parent
commit
58f58b60c0
2 changed files with 1 additions and 3 deletions
  1. +1
    -1
      src/Web/WebSPA/Client/modules/catalog/catalog.component.ts
  2. +0
    -2
      src/Web/WebSPA/Client/modules/shared/components/pager/pager.ts

+ 1
- 1
src/Web/WebSPA/Client/modules/catalog/catalog.component.ts View File

@ -95,7 +95,7 @@ export class CatalogComponent implements OnInit {
itemsPage : catalog.pageSize, itemsPage : catalog.pageSize,
totalItems : catalog.count, totalItems : catalog.count,
totalPages: Math.ceil(catalog.count / catalog.pageSize), totalPages: Math.ceil(catalog.count / catalog.pageSize),
items: catalog.pageSize
items: catalog.data.length
}; };
}); });
} }


+ 0
- 2
src/Web/WebSPA/Client/modules/shared/components/pager/pager.ts View File

@ -25,8 +25,6 @@ export class Pager implements OnInit, OnChanges {
ngOnChanges() { ngOnChanges() {
if (this.model) { 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.previousDisabled = (this.model.actualPage == 0);
this.buttonStates.nextDisabled = (this.model.actualPage + 1 >= this.model.totalPages); this.buttonStates.nextDisabled = (this.model.actualPage + 1 >= this.model.totalPages);
} }


Loading…
Cancel
Save