@kvaser/canking-api
Version:
CanKing API to communicate with the CanKing service using Node.js.
158 lines (79 loc) • 1.94 kB
Markdown
[**Kvaser CanKing GUI Extensions SDK v7.5.1**](../../README.md)
***
[Kvaser CanKing GUI Extensions SDK](../../modules.md) / [controls](../README.md) / TableControlProps
Interface: TableControlProps\<T\>
Properties of the TableControl React component.
# Type Parameters
## T
`T`
# Properties
## columns
**columns**: [`TableColumn`](TableColumn.md)\<`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'.
***
## stickyHeader?
`optional` **stickyHeader**: `boolean`
Set the header sticky, defaults to false.