beartropy/tables
Flexible Livewire table component for the TALL stack (Tailwind, Alpine, Laravel, Livewire). Provides essentials like searching, sorting, filters, bulk actions, and column toggling to build customizable data tables quickly.
BeartropyTable base class provides a scaffold for CRUD-heavy applications.stdClass objects (e.g., API responses), making it versatile for hybrid data sources. The query() method allows fine-grained control over base queries (e.g., tenant isolation, soft-deletes).make:btable Artisan command streamlines initial setup.@livewire directive for inline components (e.g., expanded rows), but requires Blade template familiarity. The TableCollection class bridges Livewire’s reactivity with Laravel’s collections.glass, soft variants) and custom CSS via setTheme(). The secondaryHeader() method enables multi-row headers without layout hacks.stdClass) may require explicit normalization (e.g., processCollection()). The TableCollection class mitigates this but adds a minor abstraction layer.cache() method can optimize this but requires manual implementation.triggerCardInfoModal()) assume Tailwind’s responsive utilities. Custom breakpoints may need adjustments.GenericExport uses column labels dynamically, but complex relationships (e.g., polymorphic) may need manual overrides in exportToClipboard().stdClass fixes in v2.9.3 suggest this is addressed, but performance implications for large payloads should be tested.cache() method could be leveraged here.DateColumn pattern for other data types (e.g., CurrencyColumn, MarkdownColumn)? The package’s modularity suggests this is feasible but undocumented.BeartropyTable? The class_alias backward compatibility helps, but view templates may need refactoring.@livewire directives and Livewire components. The BeartropyTable class extends Livewire\Component, enabling seamless reactivity.query() and with() methods. Non-Eloquent data requires processCollection() overrides.setTheme().@slot, @include). The yat-table.blade.php view is the single entry point for customization.stdClass support if using API responses (v2.9.3 fixes).make:btable. Compare performance/memory usage with the legacy implementation.glass buttons in v2.9.5).class_alias to maintain backward compatibility during migration.BeartropyTable as a wrapper.property_exists() fixes (v2.9.7).key() helper fix (v2.9.8) addresses Livewire’s Blade compiler quirks.cursor-pointer (v2.8.2).bulkAction() logic).GenericExport for CSV/clipboard).yat-table.blade.php for layout changes.setTheme() for global styling.cache() for large datasets.query() overrides for complex joins.BeartropyTable or traits. The DateColumn example provides a template.wire:model and wire:key can cause serialization issues. The TableCollection class helps, but custom properties may need protected $rules in Livewire components.bt-tables-setup skill automates initial setup.ComponentDocs) aid internal documentation but require Laravel Boost.undefined property fixes in v2.9.2) and empty datasets (v2.5.0).perPage() and cursor-based navigation (v2.8.2). Test with 10K+ rows for memory limits.cache() method can reduce database queries but requires manual implementation.wire:key to avoid Livewire’s "row duplication" bug (v2.4.1).| Scenario | Risk | Mitigation |
|---|---|---|
| Livewire serialization | Custom data types break state. | Use TableCollection or normalize stdClass to arrays (v2.9.3). |
| Large exports | Memory exhaustion. | Implement chunked exports or server-side processing. |
| Tailwind CSS conflicts | Custom utilities override styles. | Scope Tailwind to the table component or use !important sparingly |
How can I help you explore Laravel packages today?