Library
Cell props, shared styles, clipboard helpers, and other grid utilities.
The Data Grid has no grid/lib/ folder. Shared utilities live next to cells and clipboard features. This page mirrors the Niko Table Library slot for those helpers.
Cell props
Section titled “Cell props”Shared editor contract for every typed cell.
CellEditorProps is what DataGridCell passes into the render prop: focus/edit flags, commit helpers, and the current CellState.
GridComboboxOption shapes searchable dropdown options (label / value).
Cell styles
Section titled “Cell styles”| Export | Role |
|---|---|
CELL_HEIGHT |
Default row/cell height (36) |
cellTriggerClass |
Classnames for the display trigger (status chrome) |
Use these when building a custom editor so alignment matches stock cells.
Clipboard helpers
Section titled “Clipboard helpers”Exported from the clipboard module / hook (used by DataGridClipboard):
| Helper | Role |
|---|---|
parseTsv |
Parse clipboard text into a 2D matrix |
serializeSelection |
Selection → TSV for copy |
Feature constants
Section titled “Feature constants”From data-grid-features.tsx: edge auto-scroll while dragging fill/move:
| Constant | Default | Role |
|---|---|---|
GRID_EDGE_ZONE |
36 |
Px near edge to start scroll |
GRID_EDGE_SPEED |
14 |
Scroll step |
clampGridIndex |
- | Clamp display indices |
Related table lib
Section titled “Related table lib”Shared table utilities (filter operators, formatting, etc.) remain under Niko Table:
- Library overview
- Install deps from
data-table-gridalso pull scroll/flash helpers used by the grid body