Interface: TableProps<T, E>
see
Table
Type parameters​
Name | Type |
---|---|
T | extends object |
E | extends any |
Properties​
columns​
• columns: TableColumn
<T
, E
>[]
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:21
data​
• Optional
data: T
[]
Array of arbitrary data
Defined in​
lib/src/core/components/Table/TableProps.tsx:15
emptyMessage​
• Optional
emptyMessage: string
Message displayed when there is no data
Defined in​
lib/src/core/components/Table/TableProps.tsx:100
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:95
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:72
hoverRow​
• Optional
hoverRow: boolean
Should apply a different style when hovering
Defined in​
lib/src/core/components/Table/TableProps.tsx:110
loading​
• Optional
loading: boolean
Is the table in a loading state
Defined in​
lib/src/core/components/Table/TableProps.tsx:105
paginationEnabled​
• Optional
paginationEnabled: boolean
If enabled, content is loaded in batch
Defined in​
lib/src/core/components/Table/TableProps.tsx:32
size​
• Optional
size: TableSize
Size of the table
Defined in​
lib/src/core/components/Table/TableProps.tsx:67
sortBy​
• Optional
sortBy: [string
, "asc"
| "desc"
]
Default sort applied to this collection
Defined in​
lib/src/core/components/Table/TableProps.tsx:83
Methods​
cellRenderer​
â–¸ cellRenderer(params
): ReactNode
Custom cell renderer
The renderer receives props { cellData, columns, column, columnIndex, rowData, rowIndex, container, isScrolling }
Parameters​
Name | Type |
---|---|
params | CellRendererParams <T , E > |
Returns​
ReactNode
Defined in​
lib/src/core/components/Table/TableProps.tsx:27
checkFilterCombination​
â–¸ Optional
checkFilterCombination(filterValues
, sortBy?
): boolean
Set this callback if you want to support some combinations of filter combinations only.
Parameters​
Name | Type |
---|---|
filterValues | Partial <Record <Extract <keyof T , string >, [WhereFilterOp , any ]>> |
sortBy? | [string , "asc" | "desc" ] |
Returns​
boolean
Defined in​
lib/src/core/components/Table/TableProps.tsx:40
onColumnResize​
â–¸ Optional
onColumnResize(params
): void
Callback when a column is resized
Parameters​
Name | Type |
---|---|
params | OnTableColumnResizeParams <T , E > |
Returns​
void
Defined in​
lib/src/core/components/Table/TableProps.tsx:62
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:46
onFilterUpdate​
â–¸ Optional
onFilterUpdate(filter?
): void
Callback used when filters are updated
Parameters​
Name | Type |
---|---|
filter? | Partial <Record <any , [WhereFilterOp , any ]>> |
Returns​
void
Defined in​
lib/src/core/components/Table/TableProps.tsx:78
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:52
onRowClick​
â–¸ Optional
onRowClick(props
): void
Callback when a row is clicked
Parameters​
Name | Type |
---|---|
props | OnRowClickParams <T > |
Returns​
void
Defined in​
lib/src/core/components/Table/TableProps.tsx:57
onSortByUpdate​
â–¸ Optional
onSortByUpdate(sortBy?
): void
Callback used when sorting is updated
Parameters​
Name | Type |
---|---|
sortBy? | [string , "asc" | "desc" ] |
Returns​
void
Defined in​
lib/src/core/components/Table/TableProps.tsx:89