Shopware Design

Entity Data Table

Source
Experimental. The API may still change in a future release. It builds on Data Table.

Usage

Entity Data Table is a repository-backed Data Table for rows that come from an Admin SDK entity repository. Use it when you want searching, sorting, pagination, and filtering to refetch automatically, plus built-in row selection and bulk-action wiring. Define availableFilters only for the filters users actually need, and handle open-details, bulk-delete, and bulk-edit in the parent component.

import { MtEntityDataTable } from "@shopware-ag/meteor-component-library";

API reference

Props

PropTypeDefault
entity *keyof EntitySchema.Entities
columns *ColumnDefinition[]
repository(<EntityName extends keyof EntitySchema.Entities>(entityName: EntityName) => { search: (criteria: default, context?: ApiContext | undefined) => Promise<default<EntityName> | null>; get: (id: string, context?: ApiContext | undefined, criteria?: default | undefined) => Promise<Entity<EntityName> | null>; save: (entity: Entity<EntityName>, context?: ApiContext | undefined) => Promise<void | null>; clone: (entityId: string, contextOrBehavior?: any, behaviorOrContext?: any) => Promise<unknown>; hasChanges: (entity: Entity<EntityName>) => Promise<boolean | null>; saveAll: (entities: default<EntityName>, context?: ApiContext | undefined) => Promise<unknown>; delete: (entityId: string, context?: ApiContext | undefined) => Promise<void | null>; create: (context?: ApiContext | undefined, entityId?: string | undefined) => Promise<Entity<EntityName> | null>; }) | undefined
force-real-modalboolean
column-changesRecord<string, ColumnChanges>
titlestring
subtitlestring
layout"default" | "full"
allow-bulk-deleteboolean
allow-bulk-editboolean
allow-row-selectionboolean
bulk-edit-more-actions{ id: string; label: string; onClick: () => void; icon?: string | undefined; type?: any; metaCopy?: string | undefined; contextualDetail?: string | undefined; }[] | undefined
disable-deleteboolean
disable-editboolean
disable-searchboolean
disable-settings-tableboolean
additional-context-buttons{ type?: "default" | "critical" | "active" | undefined; label: string; key: string; }[]
captionstring
pagination-optionsnumber[]
available-filtersAvailableFilter[]

Events

EventPayload
open-details[row: { id: string; }]
bulk-delete[rowIds: string[]]
bulk-edit[rowIds: string[]]

Best practices

Do
  • Let the wrapper own repository-backed table state.
  • Define availableFilters only for filters users actually need.
  • Handle open-details, bulk-delete, and bulk-edit in the parent component.
Don't
  • Do not use it when the parent must fully own fetching and table state.
  • Do not duplicate repository search, sort, pagination, or filter handling in the parent component.
  • Do not use it for local-only datasets where plain Data Table is enough.

Behavior

  • Data is fetched on mount.
  • The table refetches when page, limit, sort, search, or filters change.
  • availableFilters generates the filter UI for repository-backed filters.
  • Bulk actions emit the currently selected row ids.

Accessibility

  • Give the table a meaningful title or surrounding heading.
  • Keep column labels and filter labels clear and specific.
  • Data Table: when the parent component should own fetching and state management.