Skip to main content
Version: 1.1.0

IDataGridProps

@spartanfx/react v1.1.0


@spartanfx/react / index / IDataGridProps

Interface: IDataGridProps

Props for the top-level ExcelGrid component.

Properties

PropertyTypeDescription
appearance?AppearanceModeVisual appearance mode. Default AppearanceMode.light
defaultSort?objectOptional initial sort configuration.
defaultSort.columnstringField name to sort by.
defaultSort.direction"desc" | "asc"Sort direction.
editable?booleanEnables or disables cell editing.
enableNewRow?booleanEnables or disables the trailing blank row for new data entry. Default true
enableRowDeletion?booleanEnables row deletion via UI or keyboard.
enableRowSelection?booleanEnables or disables row selection checkboxes. Default true
getRowId(row) => string | numberFunction to retrieve a unique ID for each row.
layout?DataGridLayoutColumn layout mode. Default DataGridLayout.fluid
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.