Skip to main content
Version: 2.0.0-alpha

Interface: TableProps<T>

see Table

Type parameters

NameType
Textends object

Properties

columns

columns: TableColumn<T>[]

Properties displayed in this collection. If this property is not set every property is displayed, you can filter

Defined in

lib/src/core/components/Table/TableProps.tsx:19


data

Optional data: T[]

Array of arbitrary data

Defined in

lib/src/core/components/Table/TableProps.tsx:13


emptyMessage

Optional emptyMessage: string

Message displayed when there is no data

Defined in

lib/src/core/components/Table/TableProps.tsx:92


error

Optional error: Error

If there is an error loading data you can pass it here, so it gets displayed instead of the content

Defined in

lib/src/core/components/Table/TableProps.tsx:87


filter

Optional filter: Partial<Record<any, [WhereFilterOp, any]>>

In case this table should have some filters set by default

Defined in

lib/src/core/components/Table/TableProps.tsx:64


frozen

Optional frozen: boolean | "left" | "right"

Defined in

lib/src/core/components/Table/TableProps.tsx:104


hoverRow

Optional hoverRow: boolean

Should apply a different style when hovering

Defined in

lib/src/core/components/Table/TableProps.tsx:102


loading

Optional loading: boolean

Is the table in a loading state

Defined in

lib/src/core/components/Table/TableProps.tsx:97


paginationEnabled

Optional paginationEnabled: boolean

If enabled, content is loaded in batch

Defined in

lib/src/core/components/Table/TableProps.tsx:24


size

Optional size: TableSize

Size of the table

Defined in

lib/src/core/components/Table/TableProps.tsx:59


sortBy

Optional sortBy: [string, "asc" | "desc"]

Default sort applied to this collection

Defined in

lib/src/core/components/Table/TableProps.tsx:75

Methods

checkFilterCombination

Optional checkFilterCombination(filterValues, sortBy?): boolean

Set this callback if you want to support some combinations of filter combinations only.

Parameters

NameType
filterValuesPartial<Record<Extract<keyof T, string>, [WhereFilterOp, any]>>
sortBy?[string, "asc" | "desc"]

Returns

boolean

Defined in

lib/src/core/components/Table/TableProps.tsx:32


onColumnResize

Optional onColumnResize(params): void

Callback when a column is resized

Parameters

NameType
paramsOnTableColumnResizeParams<T>

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:54


onEndReached

Optional onEndReached(): void

A callback function when scrolling the table to near the end

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:38


onFilterUpdate

Optional onFilterUpdate(filter?): void

Callback used when filters are updated

Parameters

NameType
filter?Partial<Record<any, [WhereFilterOp, any]>>

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:70


onResetPagination

Optional onResetPagination(): void

When the pagination should be reset. E.g. the filters or sorting has been reset.

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:44


onRowClick

Optional onRowClick(props): void

Callback when a row is clicked

Parameters

NameType
propsObject
props.eventSyntheticEvent<Element, Event>
props.rowDataT
props.rowIndexnumber
props.rowKeystring

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:49


onSortByUpdate

Optional onSortByUpdate(sortBy?): void

Callback used when sorting is updated

Parameters

NameType
sortBy?[string, "asc" | "desc"]

Returns

void

Defined in

lib/src/core/components/Table/TableProps.tsx:81