Kvaser CanKing GUI Extensions SDK v7.6.1


Kvaser CanKing GUI Extensions SDK / controls / TableControlProps

Interface: TableControlProps<T>

Properties of the TableControl React component.

Type Parameters

T

T

Properties

columns

columns: TableColumn<T>[]

Column definitions.


data

data: T[]

Data rows to be displayed.


dataKey

dataKey: (row) => Key

Callback to get a unique data key for the specified row.

Parameters

row

T

Returns

Key


hasRemoveButton?

optional hasRemoveButton?: boolean

If each row should have a remove button


hover?

optional hover?: boolean

If true, the table row will shade on hover, defaults to false.


label?

optional label?: string

An optional table label.


labelVariant?

optional labelVariant?: TypographyVariant

An optional Typography variant to be used for the label.


maxHeight?

optional maxHeight?: string | number

Optional max height.


onClickRow?

optional onClickRow?: (row) => void

Callback to inform that a data row has been clicked.

Parameters

row

T

Returns

void


onRemoveRow?

optional onRemoveRow?: (row) => void

Callback to be run when clicking on the remove button

Parameters

row

T

Returns

void


removeButtonTitle?

optional removeButtonTitle?: string

A title for the remove button


selectedKey?

optional selectedKey?: Key

The key of the currently selected data row.


size?

optional size?: "small" | "medium"

Table size, defaults to ‘medium’.