TableEmpty
Loading example…
Single row that holds an EmptyState across every column. Put it in TableBody when there are no rows.
Import
Section titled “Import”import { TableEmpty } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/table.
<TableEmpty aria-label="Inventario de productos"> <> <TableHead> <tr> <TableHeaderCell>Producto</TableHeaderCell> <TableHeaderCell>SKU</TableHeaderCell> <TableHeaderCell alignRight>Stock</TableHeaderCell> <TableHeaderCell alignRight>Precio</TableHeaderCell> </tr> </TableHead> <TableBody> {inventory.map((item) => ( <TableRow key={item.sku}> <TableCell> {item.name} {item.low ? <Chip tone="danger">Stock bajo</Chip> : null} </TableCell> <TableCell>{item.sku}</TableCell> <TableCell alignRight>{item.stock}</TableCell> <TableCell alignRight>{item.price}</TableCell> </TableRow> ))} </TableBody> </></TableEmpty>| Prop | Type | Default | Description |
|---|---|---|---|
colSpan * |
number |
Number of columns to span: the count of header cells. | |
title |
ReactNode |
Defaults to the localized “No rows to show”. | |
description |
ReactNode |
||
icon |
ReactNode |
||
action |
ReactNode |
Call to action, e.g. a button that clears the filters. | |
className |
string |
* marks a required prop.
Storybook stories
Section titled “Storybook stories”- Default
- Link Rows
- Empty
- PinnedColumns
- User Pinning
- Controlled Pinning
- Narrow
- Flush
- Sticky Header
- Selection
- Actions Wide
- Actions Narrow Menu
- Actions Narrow Wrap
- Sortable
- Loading And Empty
- Column Visibility
- Density
- Sticky Actions
Source
Section titled “Source”packages/ui/src/containers/table/table-parts.tsx