Clipboard (copy/paste)
Prop enableClipboard — engine behaviour, default false.
Guide
When to use it
Excel-like copy / paste — copy a range (or whole column / row) as TSV, paste tabular data back into editable cells.
How it works
enableClipboard implies enableCellSelection. Copy the range with Ctrl/Cmd+C; copy a whole
column with Ctrl/Cmd+Space (across all pages, pre-pagination) and a row with Shift+Space. Paste
writes through the edit session.
Gotchas
- Paste needs
enableEditing— there's nowhere to write without an edit session. - Whole-column / whole-row copy are gated by the
enableCopyColumn/enableCopyRowsub-toggles (both on by default).
Live example
Example source
import React from 'react'
import { BstTableMui } from '@bloomskill/table-mui'
import type { BstTableColumn } from '@bloomskill/table-engine'
import '@bloomskill/table-engine/styles.css'
type Row = { id: string; name: string; team: string; role: string; score: number }
const seed: Row[] = [
{ id: '1', name: 'Ada Lovelace', team: 'Platform', role: 'Engineer', score: 92 },
{ id: '2', name: 'Alan Turing', team: 'Research', role: 'Scientist', score: 88 },
{ id: '3', name: 'Grace Hopper', team: 'Platform', role: 'Engineer', score: 95 },
{ id: '4', name: 'Katherine J.', team: 'Research', role: 'Analyst', score: 90 },
{ id: '5', name: 'Edsger Dijkstra',team: 'Platform', role: 'Architect',score: 84 },
]
const columns: BstTableColumn<Row>[] = [
{ id: 'name', accessorKey: 'name', header: 'Name' },
{ id: 'team', accessorKey: 'team', header: 'Team' },
{ id: 'role', accessorKey: 'role', header: 'Role' },
{ id: 'score', accessorKey: 'score', header: 'Score', sortFn: 'basic' },
]
export default function App() {
return (
<BstTableMui data={seed} columns={columns} getRowId={(r) => r.id}
enableCellSelection enableClipboard showStatusBar />
)
}
Overview
| Layer | enable* (engine, resolved in useBstTable) |
| Type | boolean |
| Default | false |
| Maps to | custom feature (implies enableCellSelection; paste needs enableEditing). Copy-column (H3): Ctrl+Space / copyColumn copies the whole column across ALL pages (pre-pagination); Shift+Space / copyRow for rows |
| Status | ✅ done (Phase 3; copy-column all-pages v0.24.0) |
| Since | v0.3.0 |
| Settings sheet | Selection & clipboard |
Clipboard copy / paste. Copy the selection as TSV (Ctrl/Cmd+C); paste TSV from the active cell (Ctrl/Cmd+V) honouring editability + validation. Implies enableCellSelection; paste additionally requires enableEditing. Default: false (opt-in).
Enable it
<BstTableMui
data={rows}
columns={columns}
enableClipboard
/>
Swap
BstTableMuiforBstTableShadcn(and the CSS import) for the shadcn skin — same props.
Behavior & interactions
- Implies
enableCellSelection(turned on for you). - Copy works read-only; PASTE additionally requires
enableEditing.
Spec coverage
Spec codes (
A1,C2,X8, …) are Bst-Table's internal requirement IDs from the capability matrix;P0–P2mark the delivery phase. They are traceability tags, not part of the public API.
- H1 · Copy cell — ✅ built. P3
- H2 · Copy row — ✅ built. P3
- H3 · Copy column — ✅ built. fixed — runtime.copyColumn / Ctrl+Space selects the whole column and copies all pages (pre-pagination, filter+sort order); copyRow/Shift+Space too. Server-tier export rides the Phase-4 foundation
- H4 · Paste — ✅ built. P3 — needs enableEditing