Data Table
The Data Table component is used to show data.
1. Import
KUMUI exports 2 DataTable-related components:
import { DataTable, DataTableColumnHeader } from "@rohitgadekar/kimui";
2. Usage
| John Doe | john@example.com | Admin |
| Jane Smith | jane@example.com | User |
| Alice Brown | alice@example.com | Editor |
| Bob Green | bob@example.com | Admin |
| Chris White | chris@example.com | User |
| Diana Blue | diana@example.com | Editor |
| Eve Black | eve@example.com | User |
| Frank Yellow | frank@example.com | Admin |
| Grace Pink | grace@example.com | Editor |
| Hank Orange | hank@example.com | User |
0 of 20 row(s) selected.
Rows per page
Page 1 of 2
3. API
3.1 DataTable
| Attribute | Type | Description | Default |
|---|---|---|---|
| columns | Array<{ accessorKey: string, header: Function, cell: Function }> | The column definitions for the data table. | - |
| data | Array<Object> | The data array that populates the table rows. | - |
| searchKey | string | The key in the data to be used for searching. | "email" |