Skip to content

Commit

Permalink
fix(admin-ui): Add unique location id for prod detail variants table
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Oct 17, 2023
1 parent 08ad982 commit ce2b251
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
<ng-template #variantList>
<vdr-product-variant-list
[productId]="this.id"
dataTableId="product-detail-variants-list"
[hideLanguageSelect]="true"
></vdr-product-variant-list>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</vdr-page-block>
<vdr-data-table-2
class="mt-2"
id="product-variant-list"
[id]="dataTableId || 'product-variant-list'"
[items]="items$ | async"
[itemsPerPage]="itemsPerPage$ | async"
[totalItems]="totalItems$ | async"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, Input, OnInit } from '@angular/core';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import {
LogicalOperator,
DataTableLocationId,
ProductVariantListQueryDocument,
TypedBaseListComponent,
} from '@vendure/admin-ui/core';
Expand All @@ -17,6 +17,7 @@ export class ProductVariantListComponent
{
@Input() productId?: string;
@Input() hideLanguageSelect = false;
@Input() dataTableId: DataTableLocationId | undefined;
readonly customFields = this.getCustomFieldConfig('ProductVariant');
readonly filters = this.createFilterCollection()
.addIdFilter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type DataTableLocationId =
| 'edit-options-list'
| 'manage-product-variant-list'
| 'customer-order-list'
| 'product-detail-variants-list'
| string;

export type DataTableColumnId =
Expand Down

0 comments on commit ce2b251

Please sign in to comment.