Skip to content

TuskQuery/grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tusk/grid

Virtualized data-grid component for Tusk. Postgres-agnostic — exposes a ColumnDef / Row shape and cell-renderer plugins, takes rows from any source.

Install

bun add @tusk/grid
# or, when developing alongside Tusk:
#   "@tusk/grid": "file:../tusk-grid"

Usage

import { Grid, type ColumnDef, type Row } from '@tusk/grid';

const columns: ColumnDef[] = [
  { name: 'id', typeHint: 'int4', renderer: 'numeric', isPrimaryKey: true, widthPx: 80 },
  { name: 'name', typeHint: 'text', renderer: 'text', isPrimaryKey: false, widthPx: 200 },
];
const rows: Row[] = [[1, 'Alice'], [2, 'Bob']];

const { handle, api } = Grid({
  columns,
  rows,
  onCellCommit(rowIndex, columnIndex, newValue) { /* … */ },
});

Status

Pre-D2: placeholder widget that renders Grid: N rows × M cols. Real virtualization, column header, cell renderers, and inline edit land in milestone D2 of the Tusk plan.

License

MIT.

About

Virtualized data-grid component for Tusk — type-aware cell renderers, inline edit. Postgres-agnostic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors