1.0.0 • Published 6 months ago
pro-react-table v1.0.0
Pro React Table
A professional React table component with sorting, pagination, and search capabilities.
Installation
npm install pro-react-table
Usage
import ProTable from 'pro-react-table';
const MyComponent = () => {
const columns = [
{ header: 'Name', rowKey: 'name' },
{ header: 'Age', rowKey: 'age' },
{ header: 'City', rowKey: 'city' },
];
const data = [
{ id: 1, name: 'John Doe', age: 30, city: 'New York' },
{ id: 2, name: 'Jane Smith', age: 25, city: 'London' },
];
return (
<ProTable
rowData={data}
columns={columns}
initialEntriesPerPage={10}
/>
);
};
Features
- Pagination
- Search functionality
- Entries per page selection
- Responsive design
- TypeScript support
- Customizable styling
Props
Prop | Type | Default | Description |
---|---|---|---|
rowData | array | [] | Array of data to display in the table |
columns | Column[] | [] | Array of column configurations |
initialEntriesPerPage | number | 10 | Initial number of entries per page |
License
MIT
1.0.0
6 months ago