From 5587144612bf3f2628c70ceeb6fcdb82a1af5c52 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 8 Sep 2020 11:32:10 +0200 Subject: [PATCH] fix(admin-ui): Correctly update product list after deletion Fixes #453 --- .../src/components/product-list/product-list.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts b/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts index ca04840bf0..87b50102c3 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts +++ b/packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts @@ -123,6 +123,9 @@ export class ProductListComponent }) .pipe( switchMap(response => (response ? this.dataService.product.deleteProduct(productId) : EMPTY)), + // Short delay to allow the product to be removed from the search index before + // refreshing. + delay(500), ) .subscribe( () => {