mrpunyapal/filament-infinite-select

A Filament Select component with infinite scroll lazy loading for options
585 9
Install
composer require mrpunyapal/filament-infinite-select
Latest Version:v0.2.0
PHP:^8.2
License:MIT
Last Updated:Sep 26, 2026
Links: GitHub  ·  Packagist
Maintainer: MrPunyapal

Filament Infinite Select

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.

Related Packages

fibtegis/filament-infinite-scroll

Seamless infinite scrolling plugin that replaces pagination in Filament Tables.

4,200 20
cocosmos/filament-quick-add-select

Instantly create and select new options in Filament relationship selects without...

14,063 17
novadaemon/filament-combobox

Side by side combobox multiselect field to use in your FilamentPHP forms

33,721 26
dvarilek/filament-table-select

Laravel Filament form component for selecting related records with a table.

13,287 40
yeganehha/filament-records-finder

This packages allows you to easily integrate a beautiful Record Finder into your...

20 2