Browse Source

Fixed call error when filter item is applied

pull/1549/head
Carlos de Miguel Ferrero 4 years ago
parent
commit
279dc6f1c0
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/Web/WebSPA/Client/modules/catalog/catalog.component.ts

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

@ -56,6 +56,9 @@ export class CatalogComponent implements OnInit {
onFilterApplied(event: any) {
event.preventDefault();
this.brandSelected = this.brandSelected && this.brandSelected.toString() != "null" ? this.brandSelected : null;
this.typeSelected = this.typeSelected && this.typeSelected.toString() != "null" ? this.typeSelected : null;
this.getCatalog(this.paginationInfo.itemsPage, this.paginationInfo.actualPage, this.brandSelected, this.typeSelected);
}
@ -82,6 +85,7 @@ export class CatalogComponent implements OnInit {
getCatalog(pageSize: number, pageIndex: number, brand?: number, type?: number) {
this.errorReceived = false;
this.service.getCatalog(pageIndex, pageSize, brand, type)
.pipe(catchError((err) => this.handleError(err)))
.subscribe(catalog => {


Loading…
Cancel
Save