API Reference
This page provides a technical overview of the properties and types used in the Rowstack <Table /> component.
#Props
| Prop | Type | Required | Description |
|---|---|---|---|
data | Data[] | Yes | Array of objects representing rows. |
columns | Column[] | Yes | Array of column definitions. |
licenseKey | string | Yes | Your Rowstack license key. |
onChange | (state) => void | No | Callback triggered on any state change. |
config | Partial<Config> | No | Configuration object for features. |
#Type Definitions
#Column
interface Column {
id: string;
name: string;
width?: number;
type?: ColumnType;
isVisible?: boolean;
isEditable?: boolean;
options?: Option[]; // For select types
renderer?: React.Component; // For custom types
}
#Config
interface Config {
theme?: { color: "light" | "dark" };
toolbar?: { enabled: boolean };
addRow?: { enabled: boolean; body: boolean; toolbar: boolean };
addColumn?: { enabled: boolean };
readOnly?: { enabled: boolean };
selectRow?: { enabled: boolean };
filtering?: { enabled: boolean };
sorting?: { enabled: boolean };
grouping?: { enabled: boolean };
footer?: { enabled: boolean };
rowHeight?: { enabled: boolean };
}
#Option (for Select/Multi-Select)
interface Option {
name: string;
value: string;
color: string; // Tailwind color name or hex
}