DataTableRows
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.
<origam-data-table-rows> — 4 output variants: data row ①, group header row ②, empty state ③, and skeleton/loading ④.- 1OrigamDataTableRow
- Standard
OrigamDataTableRowrendered for each flat data item. Receives computeditemSlotProps.propsincluding key, onClick, mobileBreakpoint and aria-rowindex. - 2OrigamDataTableGroupHeaderRow
OrigamDataTableGroupHeaderRowrendered 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 oneOrigamSkeletonper 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.
- hideNoDatabooleanfalse
- Suppresses the empty-state row when there are no items.
- itemsArray<IDataTableItem | IDataTableGroup> | readonly (IDataTableItem | IDataTableGroup)[]
- Array of internal item or group descriptors to render. Provided by the DataTable parent via useGroupBy / usePagination.
- noDataTextstring'origam.noDataText'
- i18n key for the text shown in the empty-state row. Resolved via useLocale.
- rowPropsTDataTableRow<any>
- Static or callback props merged onto every DataTableRow. A function receives { item, index, internalItem }.
- cellPropsTDataTableCell<any>
- Static or callback props forwarded to every DataTableColumnCell in every row.
- idstring
- colorTColor
- loadingTLoadingValuefalse
- When truthy, renders loading rows instead of data. Accepts true (default text row), "skeleton" (OrigamSkeleton per cell), "line" or "circular".
- mobilebooleanfalse
- Forces mobile stacked layout on all rows.
- loadingTextstring'origam.dataIterator.loadingText'
- i18n key for the loading state text. Resolved via useLocale.
- mobileBreakpointnumber | 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
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Moves focus through interactive elements inside rows (checkboxes, expand buttons, clickable cells). |
Notes
- Skeleton placeholder rows expose <code>aria-busy="true"</code> on each <code><tr></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><td colspan></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.
- colorvar(--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
Custom empty state
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.
DataTable
Full-featured data table with sorting, pagination, selection and grouping.
DataTableRow
Single data row rendering each column cell.
DataTableHeaders
Header row container that renders all column header cells and an optional loader.
DataTableHeaderCell
Individual th cell in a DataTable header row with sort support.