When clicking the 'Refresh Data' button we receive - TypeError: Cannot read property 'filter' of undefined, in the following scenario:
In APM-WithExtras in product-list.component.html uncomment the 'Refresh Data' button and in product.service.ts replace the this.products$ observable with this.products2$ in the combineLatest operator for the productsWithCategory$ property like so:
productsWithCategory$ = combineLatest([ this.products2$, this.productCategoryService.productCategories$ ]).pipe( map(([products, categories]) => products.map(product => ({ ...product, price: product.price * 1.5, category: categories.find(c => product.categoryId === c.id).name, searchKey: [product.productName] }) as Product) ), shareReplay(1) );
The error is being thrown in product-list.component.ts on the products$ property due to the this.productService.productsWithCRUD$ observable being undefined following the scan operation.