Table selection: opt-in bulk-actions toolbar
- Dominant language
- TypeScript
- Stars
- 13.1k
- Forks
- 1.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 687
Description
Part of the Table feature suite tracker #3639.
**Feature area:** Selection & interaction
### Problem
`useTableSelection` gives per-row checkboxes and select-all, but no surface for acting on a selection. Internal tables (and the EPS table, source of this port) show a bulk-actions toolbar above the table when rows are selected: a count, action buttons (Delete, Export, etc.), and an optional "select all N matching" affordance.
### Proposal
Extend `useTableSelection` with an optional `bulkActions` config. When present, the plugin injects a toolbar into the scroll wrapper via `transformScrollWrapper.beforeTable` while rows are selected. Off by default: tables that omit `bulkActions` are byte-identical to today (zero regression).
Config sketch:
- `actions: TableBulkAction[]` where a `TableBulkAction` is `{label, onClick(selectedKeys), variant?, disabled?}`
- `renderLabel?(count, total)` (default `"N selected"`)
- `extraContent?(count)`
- `selectAllMatching?: {totalMatchingCount, isSelectAllMatching, onSelectAllMatching}`
### Notes
- Astryx `transformScrollWrapper` already exposes `beforeTable` / `afterTable` slots, so the injection point exists.
- Styled with StyleX (the EPS original used Tailwind + eps tokens).
- Start with an in-flow toolbar in the `beforeTable` slot with a fade/slide. The EPS "float over the table + sticky-pin on scroll" polish (absolute positioning, IntersectionObserver) can be a follow-up.
Mirrors the internal EPS bulk-selection toolbar.
Contributor guide
Assessment
This issue has not been assessed yet.