Column

Column for BaseTable

Props

classNamestring | func

Class name for the column cell, could be a callback to return the class name The callback is of the shape of ({ cellData, columns, column, columnIndex, rowData, rowIndex }) => string

headerClassNamestring | func

Class name for the column header, could be a callback to return the class name The callback is of the shape of ({ columns, column, columnIndex, headerIndex }) => string

styleobject

Custom style for the column cell, including the header cells

titlestring

Title for the column header

dataKeystring

Data key for the column cell, could be "a.b.c"

dataGetterfunc

Custom cell data getter The handler is of the shape of ({ columns, column, columnIndex, rowData, rowIndex }) => node

align'left' | 'center' | 'right'

Alignment of the column cell

flexGrownumber

Flex grow style, defaults to 0

flexShrinknumber

Flex shrink style, defaults to 1 for flexible table and 0 for fixed table

widthnumberrequired

The width of the column, gutter width is not included

maxWidthnumber

Maximum width of the column, used if the column is resizable

minWidthnumber

Minimum width of the column, used if the column is resizable

frozen'left' | 'right' | true | false

Whether the column is frozen and what's the frozen side

hiddenbool

Whether the column is hidden

resizablebool

Whether the column is resizable, defaults to false

sortablebool

Whether the column is sortable, defaults to false

cellRendererfunc | element

Custom column cell renderer The renderer receives props { cellData, columns, column, columnIndex, rowData, rowIndex, container, isScrolling }

headerRendererfunc | element

Custom column header renderer The renderer receives props { columns, column, columnIndex, headerIndex, container }