Core reference / Grid options
Grid options
The OmniGrid React component accepts a flat options object that combines column definitions, row data, identity, dimension tuning, and plugin composition. Every prop is optional except columns (and data unless provided via a plugin).
Constructor
new Grid<T>(options: GridOptions<T>)Options
Properties accepted by GridOptions<T>.
| Property | Description |
|---|---|
columns ColumnDef<T>[] | Column definitions. See the Column definitions reference for the full set of properties. |
data T[]? | Array of row data. Omit when providing data through a plugin (e.g. server-side pagination); otherwise required for display. |
getRowId (row: T, index: number) => RowIddefault: (row, index) => index | Function that returns a stable unique ID for each row. Providing a stable ID prevents unnecessary re-renders when data mutates. |
rowHeight numberdefault: 32 | Fixed height (px) for each row. All rows share the same height so the virtualizer can compute offsets without measuring. |
rowOverscan numberdefault: 4 | Number of extra rows to render above and below the visible viewport. Prevents blank flashes during fast scrolling. |
columnOverscan numberdefault: 0 | Number of extra columns to render beyond the horizontal scroll window. |
plugins GridPlugin<T>[]default: [] | Array of plugin instances. Plugins add behavior such as sorting, selection, and pagination without coupling to the core engine. |
suppressRowHoverHighlight booleandefault: false | Disables the CSS class applied to a row on hover. |
rowStyle RowStyle | Static CSS styles applied to every row node. |
getRowStyle (params: RowRenderParams<T>) => RowStyle | undefined | Dynamic row styles computed per visible row. |
rowClass string | ((params) => string | undefined) | Static or dynamic CSS class applied to every row node. |
getRowClass (params: RowRenderParams<T>) => string | undefined | Dynamic row class computed per visible row. |
rowClassRules RowClassRules<T> | Map of class name to predicate. Rules are evaluated in batch on every viewport commit. |