Filament Infinite Scroll is a lightweight plugin that replaces the standard Filament v3 table pagination with a fluid, auto-loading infinite scroll mechanism. It is compatible with all tables, including Resources, Relation Managers, Widgets, and standalone Table Builders.
As the user approaches the end of a list, more rows are fetched transparently via Livewire, preserving filters, search, and sorting.
Developed and maintained by Fibtegis Yazılım Proje ve Danışmanık Hizmetleri LTD. ŞTİ. https://fbt.gs
->infinite()
method.Package | Version |
---|---|
PHP | 8.1+ |
Laravel | 10 or 11 |
Filament | 3.0+ |
Livewire | Ships with Filament |
Alpine.js | Ships with Filament |
Install the package into your project via Composer:
composer require fibtegis/filament-infinite-scroll
After installation, it's good practice to clear cached views and plugins:
php artisan optimize:clear
The plugin is auto-discovered by Filament. No manual registration is needed.
Enabling infinite scroll is just a two-step process:
Use the Trait:
Add the InteractsWithInfiniteScroll
trait to your respective ListRecords
page, relation manager, or table widget.
// app/Filament/Resources/CustomerResource/Pages/ListCustomers.php use Fibtegis\FilamentInfiniteScroll\Concerns\InteractsWithInfiniteScroll;use Filament\Resources\Pages\ListRecords; class ListCustomers extends ListRecords{ use InteractsWithInfiniteScroll; // ...}
Enable the Method:
Inside your table()
method, chain the ->infinite()
method to your table definition.
// app/Filament/Resources/CustomerResource.php use Filament\Tables\Table; public static function table(Table $table): Table{ return $table ->columns([ // ... your columns ... ]) ->filters([ // ... your filters ... ]) ->actions([ // ... your actions ... ]) ->bulkActions([ // ... your bulk actions ... ]) ->infinite(); // 👈 Just add this line}
That's it! Your table will now automatically load new records when you scroll to the bottom.
The infinite()
method accepts a parameter to define the number of records to load per batch.
->infinite(perPage: 50) // Load 50 records at a time (default: 25)
Option | Default | Description |
---|---|---|
perPage |
25 |
The number of records to fetch in each batch. |
Table::mixin
adds the ->infinite()
method. This method disables native pagination and limits the query based on the current page.InteractsWithInfiniteScroll
Trait tracks the current $page
number and whether all records have been loaded ($infiniteEnded
).IntersectionObserver
to detect when the end of the page is reached.loadMore()
method is triggered via Livewire.<head>
tag. This ensures the style is permanent and unaffected by Livewire updates.$infiniteEnded = true
), the observer is automatically stopped.If you find this plugin useful and would like to support its future development, you can do so by simply acquiring our company's token. Your support is greatly appreciated and helps us continue to maintain and improve this project.
CXun4JaKiDLmPHrcMLbB2v9ZEqXztp7SsRtgHpmYpump
Published under the Apache-2.0 License. See the LICENSE
file for details.
© 2025 Fibtegis Yazılım Proje ve Danışmanık Hizmetleri LTD. ŞTİ.
If you're using both InteractsWithInfiniteScroll
and AdvancedTables
traits in the same class (such as ListRecords
), method name collisions like updatedTableFilters
, updatedTableSearch
, and updatedTableSortColumn
may occur.
To resolve this, explicitly alias the methods and define a custom implementation that calls both versions:
use InteractsWithInfiniteScroll, AdvancedTables { InteractsWithInfiniteScroll::updatedTableFilters as infiniteUpdatedTableFilters; InteractsWithInfiniteScroll::updatedTableSearch as infiniteUpdatedTableSearch; InteractsWithInfiniteScroll::updatedTableSortColumn as infiniteUpdatedTableSortColumn; AdvancedTables::updatedTableFilters as advancedUpdatedTableFilters; AdvancedTables::updatedTableSearch as advancedUpdatedTableSearch; AdvancedTables::updatedTableSortColumn as advancedUpdatedTableSortColumn;} public function updatedTableFilters(): void{ $this->infiniteUpdatedTableFilters(); $this->advancedUpdatedTableFilters();} public function updatedTableSearch(): void{ $this->infiniteUpdatedTableSearch(); $this->advancedUpdatedTableSearch();} public function updatedTableSortColumn(): void{ $this->infiniteUpdatedTableSortColumn(); $this->advancedUpdatedTableSortColumn();}
This ensures both plugins work together without conflict.
Thanks goes to these wonderful people:
OccTherapist 💻 |
Fibtegis is a software development and consultancy company based in Turkey. Specializing in the Laravel and Filament ecosystem, we build efficient and scalable solutions for businesses. We are passionate about contributing to open-source projects and supporting the community.