From 690dd0f9b82e34bdcb64e86a4f0c0d96dc253736 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Fri, 4 Oct 2024 11:44:41 +0200 Subject: [PATCH] fix(admin-ui): Lazy-load only selected custom fields in list views Relates to #3097 --- .../collection-list.component.html | 3 +- .../collection-list.component.ts | 6 ++- .../facet-list/facet-list.component.html | 3 +- .../facet-list/facet-list.component.ts | 1 + .../product-list/product-list.component.html | 9 ++-- .../product-list/product-list.component.ts | 2 + .../data/providers/collection-data.service.ts | 29 ++++++---- .../data/providers/product-data.service.ts | 3 ++ .../data-table-2/data-table2.component.ts | 54 +++++++------------ .../customer-group-list.component.html | 3 +- .../customer-group-list.component.ts | 1 + .../customer-list.component.html | 3 +- .../customer-list/customer-list.component.ts | 1 + .../promotion-list.component.html | 3 +- .../promotion-list.component.ts | 1 + .../order-list/order-list.component.html | 3 +- .../order-list/order-list.component.ts | 6 ++- .../administrator-list.component.html | 3 +- .../administrator-list.component.ts | 1 + .../channel-list/channel-list.component.html | 3 +- .../channel-list/channel-list.component.ts | 1 + .../country-list/country-list.component.html | 3 +- .../country-list/country-list.component.ts | 1 + .../payment-method-list.component.html | 3 +- .../payment-method-list.component.ts | 1 + .../role-list/role-list.component.html | 3 +- .../role-list/role-list.component.ts | 1 + .../seller-list/seller-list.component.html | 3 +- .../seller-list/seller-list.component.ts | 1 + .../shipping-method-list.component.html | 3 +- .../shipping-method-list.component.ts | 1 + .../stock-location-list.component.html | 3 +- .../stock-location-list.component.ts | 1 + .../tax-category-list.component.html | 3 +- .../tax-category-list.component.ts | 1 + .../tax-rate-list.component.html | 3 +- .../tax-rate-list/tax-rate-list.component.ts | 1 + .../zone-list/zone-list.component.html | 3 +- .../zone-list/zone-list.component.ts | 1 + 39 files changed, 109 insertions(+), 66 deletions(-) diff --git a/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.html b/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.html index 54ec677643..37129c1880 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.html +++ b/packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list.component.html @@ -25,7 +25,7 @@ ; subCollections$: Observable>>; expandedIds: string[] = []; + dataTableListId = 'collection-list'; readonly customFields = this.getCustomFieldConfig('Collection'); readonly filters = this.createFilterCollection() .addIdFilter() @@ -58,7 +59,10 @@ export class CollectionListComponent .addCustomFieldSorts(this.customFields) .connectToRoute(this.route); - constructor(protected dataService: DataService, private notificationService: NotificationService) { + constructor( + protected dataService: DataService, + private notificationService: NotificationService, + ) { super(); super.configure({ document: GetCollectionListDocument, diff --git a/packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.html b/packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.html index abd77599d4..911533713a 100644 --- a/packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.html +++ b/packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.html @@ -23,7 +23,7 @@ - + {{ 'catalog.create-new-product' | translate }} - +