Methods
CoolTable(data, excludedColumns) → {React.Component}
A customizable and sortable table component. It allows excluding certain columns,
provides search functionality, and supports sorting. The table renders data passed to it,
applying column formatting and sorting based on user interactions.
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<Object> | The data to be displayed in the table. |
excludedColumns |
Array.<string> | The columns to be excluded from the table. |
- Source:
Returns:
A React component representing a dynamically generated table.
- Type
- React.Component
HeaderTable(columnsName, onSortChange, sortConfig) → {React.Component}
- A table header component that displays column names with sorting functionality.
Includes visual indicators (arrows) to show the current sort direction for each column.
Clicking on a column header triggers sorting based on that column.
Parameters:
Name | Type | Description |
---|---|---|
columnsName |
Array.<{Header: string, dataKey: string}> | Array of objects representing column headers and their respective data keys. |
onSortChange |
function | Callback function to be called when a column header is clicked for sorting. |
sortConfig |
Object | Object containing the current sorting configuration (column key and direction). |
- Source:
Returns:
A React component representing the table header with sorting capabilities.
- Type
- React.Component