Skip to main content

Row resize

Prop enableRowResize — engine behaviour, default false.

Guide

When to use it

Let users set a row's height by dragging — handy for rows with images or wrapped text they want taller.

How it works

Adds a drag handle on a row's bottom edge; dragging sets that row's height (kept in local state). Double-click the handle to reset. It's always shown in the settings sheet ("Rows"), so an end-user can switch it on without developer wiring.

Gotchas

  • Manual height clips overflow — pair with enableAutoRowHeight if you'd rather rows grow to fit content automatically.
  • Heights are per grid instance and reset on unmount unless you persist them.

Live example

Row resize — drag a row's bottom edge to set its height

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}
enableRowResize pagination={false} showToolbar={false} />
)
}
Loading live example…

Overview

Layerenable* (engine, resolved in useBstTable)
Typeboolean
Defaultfalse
Maps tocustom — per-cell bottom drag handle → per-row height (local state); double-click resets; always shown in the settings sheet ("Rows", alwaysShow) so an end-user can switch it on without developer wiring (like row/column virtualization)
Status✅ done
Sincev0.25.0
Settings sheetRows

Row resizing — drag the bottom edge of any row to set its height; the whole row's cells grow/shrink and content is clipped when shorter. Per-row heights are local UI state (double-click a row's handle to reset it). Opt-in. Default false. Column resize is separate (enableColumnResizing).

Enable it

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

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.

  • G2 · Row & column resizing — ✅ built. column resize (P3) + row resize v0.25.0 (enableRowResize — drag a row edge to set its height, double-click to reset)