IDataGridProps
@spartanfx/react / IDataGridProps
Interface: IDataGridProps
Props for the top-level ExcelGrid component.
Properties
| Property | Type | Description |
|---|---|---|
defaultSort? | object | Optional initial sort configuration. |
defaultSort.column | string | Field name to sort by. |
defaultSort.direction | "desc" | "asc" | Sort direction. |
editable? | boolean | Enables or disables cell editing. |
enableRowDeletion? | boolean | Enables row deletion via UI or keyboard. |
getRowId | (row) => string | number | Function to retrieve a unique ID for each row. |
lockedCells? | Map<string, boolean> | Map of locked cell keys (formatted as "rowIdx-colIdx"). |
lockedRows? | Set<number> | Set of row indices that are locked (cannot be edited or deleted). |
onChange | (changes) => void | Callback triggered with changes to the grid data. |
onSortChange? | (column, direction) => void | Callback triggered when the user changes sort order. |
rawData | Record<string, unknown>[] | The raw tabular data to display. |
schema | ColumnSchema[] | Schema defining columns, types, and behavior. |
sortable? | boolean | Enables column sorting via header clicks. |
stickyColumnsCount? | number | Number of columns to freeze on the left. |