PHP code example of asignua / filament-infinite-scroll
1. Go to this page and download the library: Download asignua/filament-infinite-scroll library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
asignua / filament-infinite-scroll example snippets
return $table->columns([...])->infiniteScroll();
use Asignua\FilamentInfiniteScroll\InfiniteScrollMode;
public static function table(Table $table): Table
{
return $table
->columns([...])
->infiniteScroll(
perPage: 25, // rows per chunk (first and every next one)
mode: InfiniteScrollMode::Scroll, // or 'scroll' | 'button'
maxRecords: 500, // false removes the ceiling
rootMargin: 300, // px before the end at which the next chunk is requested
);
}
bash
php artisan vendor:publish --tag=filament-infinite-scroll-config