Skip to content

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,typeColumnDef,typeRow}from'@tusk/grid';constcolumns: ColumnDef[]=[{name: 'id',typeHint: 'int4',renderer: 'numeric',isPrimaryKey: true,widthPx: 80},{name: 'name',typeHint: 'text',renderer: 'text',isPrimaryKey: false,widthPx: 200},];constrows: 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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages