Describes the header and cell contents of a table column
| Property | Type | Required? | Description |
|---|---|---|---|
| cellClassName | String | CSS class to apply to cell | |
| cellDataGetter | Function | Callback responsible for returning a cell's data, given its dataKey. Learn more |
|
| cellRenderer | Function | Callback responsible for rendering a cell's contents. Learn more | |
| columnData | Object | Additional data passed to this column's cellDataGetter |
|
| dataKey | any | ✓ | Uniquely identifies the row-data attribute correspnding to this cell |
| disableSort | Boolean | If sort is enabled for the table at large, disable it for this column | |
| flexGrow | Number | Flex grow style; defaults to 0 | |
| flexShrink | Number | Flex shrink style; defaults to 1 | |
| headerClassName | String | CSS class to apply to this column's header | |
| headerRenderer | Function | Optional callback responsible for rendering a column's header column. Learn more | |
| label | String | Header label for this column | |
| maxWidth | Number | Maximum width of column; this property will only be used if :flexGrow is greater than 0 | |
| minWidth | Number | Minimum width of column | |
| width | Number | ✓ | Flex basis (width) for this column; This value can grow or shrink based on flexGrow and flexShrink properties |
Callback responsible for returning a cell's data, given its dataKey.
It should implement the following signature:
function (dataKey: string, rowData: any): anyA default cellDataGetter is provided that simply returns the attribute as a String.
This function expects to operate on either a vanilla Object or an Immutable Map.
You should override this default method if your data is calculated or requires any custom processing.
Callback responsible for rendering a cell's contents. It should implement the following signature:
function (cellData: any, cellDataKey: string, rowData: any, rowIndex: number, columnData: any): elementA defdault cellRenderer is provided that displays an attribute as a simple string
You should override this default method if your data is some other type of object or requires custom formatting.
Callback responsible for rendering a cell's header column. It should implement the following signature:
function ({ columnData: any, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: SortDirection }): elementA defdault headerRenderer is provided that displays the column label along with a sort indicator if the column is sort-enabled and active.
You should override this default method if you want to customize the appearance of table columns.