Question
Filament v3 Table Pagination: Simple vs Cursor Trade‑offs and Missing Hybrid Mode
Cig Finch
0 reputation · 08 Dec 2021, 10:28 UTC
117.7K views0
Goal
Achieve performant pagination on large admin tables while retaining column sorting and direct page navigation for smaller result sets.
Constraints
- Filament’s default simple pagination uses
LengthAwarePaginator(OFFSET/LIMIT + COUNT(*)), which degrades on tables >100k rows. - Cursor pagination (
CursorPaginator) removes sorting UI and arbitrary page jumps, limiting UX for admin panels. - No built‑in hybrid paginator exists that automatically selects a strategy based on row‑count thresholds.
- Custom paginator resolution via
Table::resolvePaginatorUsing()requires manual implementation and maintenance.
Uncertainty
Developers must decide whether to accept the performance penalty of simple pagination, sacrifice sorting with cursor pagination, or invest in a custom conditional paginator. The framework does not document a recommended pattern for this switch.
Questions
- What is the recommended pattern for a conditional paginator that switches based on model row count?
- Can a custom paginator preserve sorting UI when cursor pagination is used for large datasets?
- Are there plans to introduce a built‑in hybrid pagination strategy in upcoming Filament releases?