StaticGrid#
@palmyralabs/rt-forms-mui · grid/StaticGrid.tsx
Overview#
Client-side table. Renders columns against an in-memory rowData array using the MUI package’s local BaseTable — no server fetching, no pagination infrastructure. Use for already-loaded result sets, detail drills, and fixture tables.
Props — StaticGridOptions#
From the MUI package’s grid/base/typesInternal. Shape mirrors the Mantine version:
| Prop | Type | Purpose |
|---|---|---|
columns |
ColumnDefinition[] |
Column defs (attribute, label, type, cellRenderer, …) |
rowData |
any[] |
Rows to render |
EmptyChild |
ComponentType? |
Rendered when rowData is empty |
customizer |
GridCustomizer? |
Header/footer/cell overrides |
onRowClick |
(rowData) => void? |
Per-row click handler |
setSortColumns |
(sort) => void? |
Client-side sort callback |
Ref — IPageQueryable#
Inherited from @palmyralabs/rt-forms. Only the client-side methods are meaningful on a StaticGrid.
Example#
import { StaticGrid } from '@palmyralabs/rt-forms-mui';
import type { ColumnDefinition } from '@palmyralabs/rt-forms';
const columns: ColumnDefinition[] = [
{ attribute: 'name', name: 'name', label: 'Name' },
{ attribute: 'rating', name: 'rating', label: 'Rating', type: 'NUMERIC' },
];
export function ManufacturerDrillDown({ rows }: { rows: any[] }) {
return <StaticGrid columns={columns} rowData={rows} onRowClick={r => console.log(r)} />;
}