TableSelectAllCell
Loading example…
Header cell with the select-all checkbox for the rows on screen.
Import
Section titled “Import”import { TableSelectAllCell } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/table.
<TableSelectAllCell 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> </></TableSelectAllCell>| Prop | Type | Default | Description |
|---|---|---|---|
rowKeys * |
readonly string[] |
Keys of the rows on screen. The box is checked when all are selected, mixed when some are. |
* 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