This PR introduces a PaginatedTable component that provides both pagination and expandable row features, improving data display and user interaction for larger datasets.
Key Changes and Features:
Pagination Controls:
Enables navigation across pages, showing a specific number of rows per page.
Controls include "Previous" and "Next" buttons to navigate between pages, with visual indicators for the current page and total pages.
Configurable page size for flexibility in data presentation.
Expandable Rows:
Rows can be expanded to reveal additional details without redirecting the user, creating a streamlined viewing experience.
Expandable rows are toggled via a button, with smooth animations for opening and closing.
Expands only relevant data, filtering columns where expanded views are needed, which keeps the component responsive and clean.
Reusable Column-Based Structure:
Accepts dynamic column configurations, allowing the component to adapt to various data structures.
Supports custom render functions per column for flexibility in cell rendering, such as images or formatted content.
Code Organization:
The toggleRow function efficiently manages expanded row states using a Set for O(1) access, making it performant for large datasets.
Modularized expandable row and pagination logic to enhance readability and reusability.
This PR introduces a
PaginatedTable
component that provides both pagination and expandable row features, improving data display and user interaction for larger datasets.Key Changes and Features:
Pagination Controls:
Expandable Rows:
Reusable Column-Based Structure:
Code Organization:
toggleRow
function efficiently manages expanded row states using a Set for O(1) access, making it performant for large datasets.Demo Video Representation with Dummy Data :
https://github.com/user-attachments/assets/d3136fbd-0fd2-4e8e-b249-775b2e67b6b3