Skip to main content
Version: 1.0.4

IDataGridProps

@spartanfx/react v1.0.4


@spartanfx/react / IDataGridProps

Interface: IDataGridProps

Props for the top-level ExcelGrid component.

Properties

PropertyTypeDescription
defaultSort?objectOptional initial sort configuration.
defaultSort.columnstringField name to sort by.
defaultSort.direction"desc" | "asc"Sort direction.
editable?booleanEnables or disables cell editing.
enableRowDeletion?booleanEnables row deletion via UI or keyboard.
getRowId(row) => string | numberFunction 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) => voidCallback triggered with changes to the grid data.
onSortChange?(column, direction) => voidCallback triggered when the user changes sort order.
rawDataRecord<string, unknown>[]The raw tabular data to display.
schemaColumnSchema[]Schema defining columns, types, and behavior.
sortable?booleanEnables column sorting via header clicks.
stickyColumnsCount?numberNumber of columns to freeze on the left.