TableActionsCell
Loading example…
Right-aligned cell for row actions (buttons, links). Inline actions wrap onto more lines under
a narrow table container instead of clipping; pass menu to collapse them into an overflow
menu there. The container query is on the table wrapper, never the viewport.
Import
Section titled “Import”import { TableActionsCell } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/table.
<TableActionsCell 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> </></TableActionsCell>| Prop | Type | Default | Description |
|---|---|---|---|
menu |
ReactNode |
An overflow menu (a DropdownMenu with a trigger, say). When set, it replaces the inline actions under a narrow table container (under 48rem of the wrapper’s own width), so the actions never clip or wrap. Without it the inline actions wrap and stay right-ali… |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
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.tsx