Skip to main content

Type Alias: Props<CellType>

Props<CellType> = object

Defined in: src/Spreadsheet.tsx:43

The Spreadsheet component props

Type Parameters​

CellType​

CellType extends CellBase

Properties​

Cell?​

optional Cell: CellComponent<CellType>

Defined in: src/Spreadsheet.tsx:99

The Spreadsheet's cell component.


className?​

optional className: string

Defined in: src/Spreadsheet.tsx:47

Class name to be added to the spreadsheet's root element


ColumnIndicator?​

optional ColumnIndicator: ColumnIndicatorComponent

Defined in: src/Spreadsheet.tsx:87

Component rendered above each column.


columnLabels?​

optional columnLabels: string[]

Defined in: src/Spreadsheet.tsx:67

Labels to use in column indicators.

Default Value​

alphabetical labels.

CornerIndicator?​

optional CornerIndicator: CornerIndicatorComponent

Defined in: src/Spreadsheet.tsx:89

Component rendered in the corner of row and column indicators.


createFormulaParser?​

optional createFormulaParser: Types.CreateFormulaParser

Defined in: src/Spreadsheet.tsx:62

Function used to create the formula parser (instance of "fast-formula-parser") used by the Spreadsheet by getting the spreadsheet's data.

Default Value​

function which creates a formula parser bound to the
Spreadsheet's data.

See​


darkMode?​

optional darkMode: boolean

Defined in: src/Spreadsheet.tsx:52

Use dark colors that complement dark mode

Default Value​

false


data​

data: Matrix<CellType>

Defined in: src/Spreadsheet.tsx:45

The spreadsheet's data


DataEditor?​

optional DataEditor: DataEditorComponent<CellType>

Defined in: src/Spreadsheet.tsx:103

Component rendered for cells in edit mode.


DataViewer?​

optional DataViewer: DataViewerComponent<CellType>

Defined in: src/Spreadsheet.tsx:101

Component rendered for cells in view mode.


HeaderRow?​

optional HeaderRow: HeaderRowComponent

Defined in: src/Spreadsheet.tsx:97

The spreadsheet's header row component


hideColumnIndicators?​

optional hideColumnIndicators: boolean

Defined in: src/Spreadsheet.tsx:82

If set to true, hides the column indicators of the spreadsheet.

Default Value​

false.


hideRowIndicators?​

optional hideRowIndicators: boolean

Defined in: src/Spreadsheet.tsx:77

If set to true, hides the row indicators of the spreadsheet.

Default Value​

false.


onActivate()?​

optional onActivate: (active) => void

Defined in: src/Spreadsheet.tsx:114

Callback called when Spreadsheet's active cell changes.

Parameters​

active​

Point

Returns​

void


onBlur()?​

optional onBlur: () => void

Defined in: src/Spreadsheet.tsx:116

Callback called when the Spreadsheet loses focus

Returns​

void


onCellCommit()?​

optional onCellCommit: (prevCell, nextCell, coords) => void

Defined in: src/Spreadsheet.tsx:117

Parameters​

prevCell​

null | CellType

nextCell​

null | CellType

coords​

null | Point

Returns​

void


onChange()?​

optional onChange: (data) => void

Defined in: src/Spreadsheet.tsx:108

Callback called when the Spreadsheet's data changes.

Parameters​

data​

Matrix<CellType>

Returns​

void


onEvaluatedDataChange()?​

optional onEvaluatedDataChange: (data) => void

Defined in: src/Spreadsheet.tsx:123

Callback called when the Spreadsheet's evaluated data changes.

Parameters​

data​

Matrix<CellType>

Returns​

void


onKeyDown()?​

optional onKeyDown: (event) => void

Defined in: src/Spreadsheet.tsx:106

Callback called on key down inside the spreadsheet.

Parameters​

event​

React.KeyboardEvent

Returns​

void


onModeChange()?​

optional onModeChange: (mode) => void

Defined in: src/Spreadsheet.tsx:110

Callback called when the Spreadsheet's edit mode changes.

Parameters​

mode​

Mode

Returns​

void


onSelect()?​

optional onSelect: (selected) => void

Defined in: src/Spreadsheet.tsx:112

Callback called when the Spreadsheet's selection changes.

Parameters​

selected​

Selection

Returns​

void


Row?​

optional Row: RowComponent

Defined in: src/Spreadsheet.tsx:95

The Spreadsheet's row component.


RowIndicator?​

optional RowIndicator: RowIndicatorComponent

Defined in: src/Spreadsheet.tsx:91

Component rendered next to each row.


rowLabels?​

optional rowLabels: string[]

Defined in: src/Spreadsheet.tsx:72

Labels to use in row indicators.

Default Value​

row index labels.

selected?​

optional selected: Selection

Defined in: src/Spreadsheet.tsx:84

The selected cells in the worksheet.


Table?​

optional Table: TableComponent

Defined in: src/Spreadsheet.tsx:93

The Spreadsheet's table component.