Overview
Solarecliente’s table components provide powerful data display capabilities with built-in sorting, filtering, pagination, and row actions. All tables are responsive and accessible.DataTable Component
The primary component for displaying tabular data with full feature support.Basic Usage
DataTable Props
Array of column definitions specifying how data should be displayed
Array of data objects to display in the table
Show loading skeleton while data is being fetched
Enable column sorting functionality
Enable column filtering functionality
Enable pagination or provide custom pagination configuration
Enable row selection with checkboxes
Callback function when a row is clicked
Array of action buttons to display for each row
Column Definitions
Define how each column should render and behave.- Basic Column
- Custom Render
- Formatted Value
- Nested Data
Column Configuration
Unique identifier for the column
Column header text or component
Enable sorting for this column
Enable filtering for this column
Column width (e.g., ‘200px’, ‘20%’, ‘auto’)
Custom render function:
(value, row, index) => ReactNodeCustom accessor function to extract data:
(row) => anySorting
Enable single or multi-column sorting.Filtering
Provide flexible filtering options for users.Filter Types
Text Filter
Free-form text search with debouncing
Select Filter
Dropdown selection from predefined options
Date Filter
Date range picker for temporal filtering
Number Filter
Numeric range with min/max inputs
Pagination
Customize pagination behavior and appearance.- Basic
- Custom Config
- Server-Side
Row Actions
Add action buttons for each row.Row Selection
Enable multi-row selection for batch operations.Expandable Rows
Show additional details in expandable row sections.Complete Example
Best Practices
Virtual Scrolling
Use virtual scrolling for tables with 1000+ rows to maintain performance
Debounce Filters
Debounce text filter inputs to reduce unnecessary filtering operations
Server-Side Pagination
Use server-side pagination for large datasets to reduce initial load time
Loading States
Show skeleton loaders while data is being fetched for better UX