@snmt-react-ui/table v1.13.1
Table
Props
Name | Description | Type | Default |
---|---|---|---|
columns | Sets columns for the table | ColumnType<T>[] | - |
rows | Sets rows for the table | T[] | - |
bordered | Sets borderes of the table | boolean | false |
loading | Shows spinner instead of data | boolean | false |
pagination | Determine to use pagination or not | boolean | false |
count | Sets the total amount of data | number | - |
currentPage | Current page number | number | - |
limit | Sets the amount of rows per page | number | 100 |
onPageChange | Callback fired when changing the page | (page: number) => void | - |
Column type
Key | Description | Type |
---|---|---|
title | Title of the column | string |
dataIndex | Row attribute name for which this column is using | string |
sorter | Function to sort records by clicking the column | (a: T, b: T) => number |
render | Function to render data in rows | (content?: ReactNode, record?: T, index?: number) => ReactNode |
align | Content align in column | "left" | "right" | "center" |
width | Width of the column | number | string |
expandable | Flag to collapse content in column to one line with the possibility to expand it. If the content is text (string or <Typography /> ) then use "text" variant, otherwise use "advanced" | "text" | "advanced" |
onCell | Function to set props on per cell | GetComponentProps<T> |
onSortOrderChange | Callback fired when user clicks on the column header and therefore changes the sort order | (sorts: {field: string; order: 'asc' | 'desc'}[]) => void |
T
must contain unique id
property (number
| string
)
3 months ago
4 months ago
4 months ago
4 months ago
7 months ago
8 months ago
8 months ago
4 months ago
1 month ago
3 months ago
4 months ago
5 months ago
6 months ago
8 months ago
5 months ago
5 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago