Options
All
  • Public
  • Public/Protected
  • All
Menu

The cell object is what gets passed to the callbacks and events, and contains the basic information about what to show in each cell. You should extend this interface to build a place to store your data.

example

interface GridElement extends ReactDataSheet.Cell { value: number | string | null; }

Type parameters

  • T: Cell<T, V>

  • V

Hierarchy

  • Cell

Index

Properties

Optional className

className: string | undefined

Additional class names for cells. Default: undefined.

Optional colSpan

colSpan: undefined | number

The colSpan of the cell's td element. Default: 1

Optional component

component: JSX.Element

Insert a react element or JSX to this field. This will render on edit mode. Default: undefined.

Optional dataEditor

dataEditor: DataEditor<T, V>

Optional function or React Component to render a custom editor. Overrides grid-level dataEditor option. Default: undefined.

Optional disableEvents

disableEvents: undefined | false | true

Makes cell unselectable and read only. Default: false.

Optional forceComponent

forceComponent: undefined | false | true

If true, renders what's in component at all times, even when not in edit mode. Default: false.

Optional key

key: string | undefined

By default, each cell is given the key of col number and row number. This would override that key. Default: undefined.

Optional overflow

overflow: "wrap" | "nowrap" | "clip"

How to render overflow text. Overrides grid-level overflow option. Default: undefined.

Optional readOnly

readOnly: undefined | false | true

If true, the cell will never go in edit mode. Default: false.

Optional rowSpan

rowSpan: undefined | number

The rowSpan of the cell's td element. Default: 1.

Optional valueViewer

valueViewer: ValueViewer<T, V>

Optional function or React Component to customize the way the value for this cell is displayed. Overrides grid-level valueViewer option. Default: undefined.

Optional width

width: number | string

Sets the cell's td width using a style attribute. Number is interpreted as pixels, strings are used as-is. Note: This will only work if the table does not have a set width. Default: undefined.

Generated using TypeDoc