Skip to main content

Cell/range selection + keyboard nav

Prop enableCellSelection — engine behaviour, default false.

Guide

When to use it

Spreadsheet-style cell and range selection with keyboard navigation — the foundation for clipboard, the status-bar aggregates, and range-aware actions.

How it works

Click-drag or Shift+Arrow to select a range; Arrow / Tab / Home / End navigate. It's engine-level, so both skins get it with no extra chrome.

Gotchas

  • Required (directly or implied) by enableClipboard, and by showStatusBar's sum / avg / min / max aggregates.
  • Distinct from row selection (enableRowSelection), which is checkbox-based, not range-based.

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 />
)
}
Loading live example…

Live example

Cell / range selection — a dragged block of cells is highlighted

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 />
)
}
Loading live example…

Overview

Layerenable* (engine, resolved in useBstTable)
Typeboolean
Defaultfalse
Maps tocustom feature — v9 ships cellSelectionFeature, but ours stays: it is fused with keyboard nav, clipboard, type-to-edit, find, the context menu, notes (Shift+F2), the floating action bar and selection stats. Swapping the state layer would re-plumb all of them
Status✅ done (Phase 3)
Sincev0.3.0
Settings sheetSelection & clipboard

Cell / range selection + keyboard navigation. Click / Shift-click to select a range; Arrow / Shift+Arrow / Tab / Home / End / Ctrl+A to move the active cell; Enter / F2 to edit. Default: false (opt-in).

Enable it

<BstTableMui
data={rows}
columns={columns}
enableCellSelection
/>

Swap BstTableMui for BstTableShadcn (and the CSS import) for the shadcn skin — same props.

Spec coverage

Spec codes (A1, C2, X8, …) are Bst-Table's internal requirement IDs from the capability matrix; P0P2 mark the delivery phase. They are traceability tags, not part of the public API.

  • F2 · Disable row — ✅ built. P2 — rowDisabled