DataTableRows

Data Display
stable

Container that iterates data items and renders DataTableRow, group header rows, skeleton/loading rows, and an empty-state row.

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamDataTableRowsSchematic of DataTableRows with 4 internal state variants. origam-data-table-row (data item) origam-data-table-group-header-row (group) origam-data-table-rows--no-data 1 2 3 4
Anatomy of <origam-data-table-rows> — 4 output variants: data row ①, group header row ②, empty state ③, and skeleton/loading ④.
1OrigamDataTableRow
Standard OrigamDataTableRow rendered for each flat data item. Receives computed itemSlotProps.props including key, onClick, mobileBreakpoint and aria-rowindex.
2OrigamDataTableGroupHeaderRow
OrigamDataTableGroupHeaderRow rendered for group items (type === "group"). Receives toggleGroup, isGroupOpen and selection/expand context.
3.origam-data-table-rows--no-data
Single full-width row rendered when items is empty and hideNoData=false. Text aligned center via --origam-data-table-empty---text-align.
4.origam-data-table-rows--skeleton / --loading
Loading state rows. Skeleton mode: 5 <tr aria-busy="true"> rows with one OrigamSkeleton per cell. Text mode: single row with localised loading text.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

hideNoData
boolean
false
Suppresses the empty-state row when there are no items.
items
Array<IDataTableItem | IDataTableGroup> | readonly (IDataTableItem | IDataTableGroup)[]
Array of internal item or group descriptors to render. Provided by the DataTable parent via useGroupBy / usePagination.
noDataText
string
'origam.noDataText'
i18n key for the text shown in the empty-state row. Resolved via useLocale.
rowProps
TDataTableRow<any>
Static or callback props merged onto every DataTableRow. A function receives { item, index, internalItem }.
cellProps
TDataTableCell<any>
Static or callback props forwarded to every DataTableColumnCell in every row.
id
string
color
TColor
loading
TLoadingValue
false
When truthy, renders loading rows instead of data. Accepts true (default text row), "skeleton" (OrigamSkeleton per cell), "line" or "circular".
mobile
boolean
false
Forces mobile stacked layout on all rows.
loadingText
string
'origam.dataIterator.loadingText'
i18n key for the loading state text. Resolved via useLocale.
mobileBreakpoint
number | TBreakpoint
Viewport width threshold below which mobile layout is automatically activated on all rows.

API

Slots

Emplacements de contenu exposés par ce composant.

#loading
Overrides the default loading text inside the loading row (when kind is not "skeleton").
#no-data
Overrides the default empty-state text in the no-data row.
#group-header
Overrides the default DataTableGroupHeaderRow for group items.
#item
Overrides the default DataTableRow rendering for a data item. The props field contains all computed row props (key, onClick, cellProps, mobileBreakpoint, aria-rowindex, etc.).
#expanded-row
Content rendered in the expanded row below a data item when isExpanded(item) is true.
#data-table-group
#data-table-select

API

Emits

Événements émis par ce composant.

@expand
{ item: IDataTableItem, value: boolean }
@select
{ item: IDataTableItem, value: boolean }

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child row components.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Text colour of the empty-state row.
Text colour of the text loading row.
Text alignment of the empty-state content.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

rowgroup

Interactions clavier

Interactions clavier
ToucheAction
TabMoves focus through interactive elements inside rows (checkboxes, expand buttons, clickable cells).

Notes

  • Skeleton placeholder rows expose <code>aria-busy="true"</code> on each <code>&lt;tr&gt;</code> to signal screen readers that content is loading.
  • <code>aria-rowindex</code> is set on each data row (startIndex + index + 2) to give screen readers accurate row position information in paginated tables.
  • The empty-state row uses a <code>&lt;td colspan&gt;</code> spanning all columns, with centred text. Override the no-data slot to provide a more descriptive message for screen reader users.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
var(--origam-color__surface---default)
Default row background.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Skeleton loading state

vue

Custom empty state

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.