Data Table
A flexible data table component with composable features. Supports pagination, sorting, filtering, search, row selection with bulk actions, CSV export, and column visibility toggle. All features are enabled via options and can be combined as needed.
Preview & Code
_data_table.html.erb
███
████ █████ █████████
█████████
█████ █████ ██ ██████ ████████████ █████ ████
█████████
████████ █████ ██ ██████ ███████ ██ ████ ██████ ██████ ██████ ███ █████████████ ██ ████████
███████████ ███████ ██ ███████ █████████ █████████ ████████ █████
█████████ ████████ ████████ █████
data_table_controller.js
██████ █ ██████████ █ ████ ████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ █
███████
█████████
█████████████
███████████
██████████
████████████
data_table_component.rb
█ ██████████████████████ ████
█████ ██████████████████ █ ███████████████████
███████████ ████████
███████████ ██████ █████████ ████████████ ██████████ ██████████ ████████████
████████████ ████████████ ████████████ ██████████████
███ ███████████
██████
data_table_component.html.erb
████ ██████████ █████████████████ ███ ███ ████████████████████ ██████████████ ███
███ ███████ ██
██ ██ █████████████ ██
████ ███████████ █████████ ████████████ ███████████████ █████ ██████
████ ███████████ ████████████ ███████
███ ██████ █████ ██
██ ██ ██████████ ██
████ █████████████████
██████ ███████████
███████████████████████████████
data_table_controller.js
██████ █ ██████████ █ ████ ████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ █
███████
█████████
█████████████
███████████
██████████
████████████
Changelog
- v1.0.0: Initial release with full feature set
- Client-side pagination with configurable rows per page
- Click-to-sort column headers with ascending/descending toggle
- Global search with debounced filtering
- Per-column filter inputs
- Row selection with select-all checkbox
- CSV export of current filtered/sorted data
- Column visibility toggle with dropdown
Get Full Access
Unlock the source code for this component and all others. One-time payment for lifetime access.
Get Access Now