Table
A table component that displays data in a row and column structure.
code
Expend code
DataTable
A data table component that can display various data and columns.
code
Expend code
Table
The properties of the Table component.
Prop | Type | Default | Description |
---|---|---|---|
headers | string[] | [] | Defines the column headers of the table. |
data | Array<Record<string, any>> | [] | An array of objects containing data for each row. |
className | string | "" | Additional classes that can be applied to the top-level div element of the table. |
DataTable
The properties of the DataTable component.
Prop | Type | Default | Description |
---|---|---|---|
className | string | "" | Additional classes that can be applied to the top-level div element of the data table. |
data | Array<Record<string, any>> | [] | The array of data to be displayed in the table. |
columns | Array<{ header: string, accessor: keyof T }> | [] | An array defining the headers and accessors of the columns. |
onSelectedRowsChange | (selectedRows: T[]) => void | undefined | Callback function that is triggered when the selected rows change. |