承接 prvious/filament-combobox 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prvious/filament-combobox

最新稳定版本:5.0.0

Composer 安装命令:

composer require prvious/filament-combobox

包简介

Combobox for Filament Panel

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Description bla bla bla ...

Installation

You can install the package via composer:

composer require prvious/filament-combobox

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-combobox-views"

This is the contents of the published config file:

return [
];

Usage

Basic Usage

use Prvious\Filament\Combobox\Components\Combobox;

Combobox::make('status')
    ->options([
        'draft' => 'Draft',
        'published' => 'Published',
        'archived' => 'Archived',
    ])

Setting a Search Query

You can set a search query that will be displayed in the search input when the component loads:

Combobox::make('product')
    ->searchable()
    ->options([
        // your options
    ])
    ->searchQuery('electronics')

This will populate the search input with "electronics" but will not trigger a search automatically.

Auto-Triggering a Search on Load

If you want to perform a search automatically when the component boots, use the autoSearch() method along with searchQuery():

Combobox::make('product')
    ->searchable()
    ->getSearchResultsUsing(function (string $search) {
        return Product::where('name', 'like', "%{$search}%")
            ->limit(50)
            ->pluck('name', 'id')
            ->toArray();
    })
    ->searchQuery('electronics')
    ->autoSearch()

This is useful when you want to pre-filter options based on context, such as:

  • Showing products from a specific category
  • Filtering items based on user permissions
  • Displaying search results based on a related field value

You can also conditionally enable auto-search:

Combobox::make('product')
    ->searchable()
    ->searchQuery($categoryName)
    ->autoSearch(filled($categoryName))

Note: The autoSearch() method requires that the component is searchable and has a search handler configured.

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.

统计信息

  • 总下载量: 466
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固