mrpunyapal/filament-infinite-select

A Filament Select component with infinite scroll lazy loading for options

Maintainers

Package info

github.com/MrPunyapal/filament-infinite-select

Homepage

Issues

pkg:composer/mrpunyapal/filament-infinite-select

Transparency log

Fund package maintenance!

MrPunyapal

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 1

v0.2.0 2026-08-24 17:08 UTC

This package is auto-updated.

Last update: 2026-08-24 17:08:51 UTC


README

Latest Version on Packagist Total Downloads Laravel Compatibility Filament Compatibility PHP Compatibility Laravel Boost

A Filament form component that loads select options one page at a time as the user scrolls. Use it when a select can contain hundreds or thousands of options and loading them all at once is too slow.

Options are fetched through a closure you provide. The dropdown appends each page on scroll, search queries your closure server side with debouncing, and saved values resolve their labels through separate closures so they display correctly even when they are not on the first page.

Requirements

  • PHP 8.2 or higher
  • Filament 4.x or 5.x
  • Laravel 11.28 or higher

Documentation

The documentation is available at mrpunyapal.github.io/filament-infinite-select.

Using AI agents (Claude Code, Cursor, Boost, ...)? The package ships an installable skill:

npx skills add MrPunyapal/filament-infinite-select/resources/boost/skills
# or, in a Laravel project with Boost:
php artisan boost:install

Quick example

use MrPunyapal\FilamentInfiniteSelect\InfiniteSelect;

InfiniteSelect::make('user_id')
    ->getPaginatedOptionsUsing(function (int $offset, int $limit, ?string $search) {
        $query = User::query()->orderBy('name');

        if ($search) {
            $query->where('name', 'like', "%{$search}%");
        }

        $total = (clone $query)->count();

        return [
            'options' => $query->skip($offset)->take($limit)->pluck('name', 'id')->all(),
            'hasMore' => ($offset + $limit) < $total,
        ];
    })
    ->getOptionLabelUsing(fn ($value) => User::find($value)?->name);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.