Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Searchable Select Laravel Package

ajjitech/searchable-select

A Laravel package that adds a searchable select form component with server-side AJAX filtering, keyboard navigation, and Blade/Alpine integration for building fast, user-friendly dropdowns in your applications.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer: composer require ajjitech/searchable-select. Laravel should auto-discover the service provider; if not, register it manually in config/app.php.
  • Publish any package assets/config before customizing:
    php artisan vendor:publish --provider="Ajjitech\SearchableSelect\SearchableSelectServiceProvider"
    
    Check the README for the exact publish tags; tag names are package-specific.
  • Look first at:
    • README.md usage examples and supported component/Blade syntax
    • config/searchable-select.php after publishing
    • resources/views/ for overridable markup
    • composer.json under extra.laravel for provider/alias discovery
  • First use case: replace a long <select> in a Blade form with the package’s searchable select, then verify it inside a Bootstrap/Tailwind modal. v4.0.1 specifically fixes modal search, so this is the best smoke test for the release.

Implementation Patterns

  • Basic form usage: render the package component with a name, selected value, and options. Preserve old input with old('field') and render validation errors beside the component.
  • Modal integration: initialize or refresh the select after the modal is shown. v4.0.1 fixes the search behavior in modals, but focus management and z-index still need to be correct in your modal library.
  • Livewire/Inertia workflows: bind using the documented directive/attribute (wire:model if supported), and re-initialize after Livewire DOM morphs or Inertia page swaps.
  • Remote/AJAX search: debounce input, abort stale requests, and return the option shape expected by the package. Confirm the expected JSON shape in the README before wiring a controller endpoint.
  • Multiple selects on one page: give each a unique ID and avoid duplicate JavaScript initialization. Prefer a single initializer scoped to the page or component.
  • Upgrade path from v4.0.0: v4.0.1 is a patch release with no documented breaking changes. Run composer update ajjitech/searchable-select, then clear cached views/config.

Gotchas and Tips

  • If search inside modals was broken, upgrade to v4.0.1 first. If it still fails, inspect modal focus traps, overflow: hidden, and whether the dropdown is rendered inside a container with a lower z-index.
  • Publish config before editing it; otherwise your changes may be overwritten or ignored. Remember php artisan config:cache after config changes.
  • If the component does not appear, check package discovery with php artisan about and confirm the service provider is loaded.
  • Dynamically added options or selects require re-initialization. Do not assume the package watches arbitrary DOM changes.
  • Debug with browser devtools: inspect the rendered markup, watch the network tab for remote-search requests, and check the console for initialization errors.
  • Extension points typically include published Blade views and config defaults. Override views rather than editing vendor files.
  • Confirm exact component names, Blade tags, and config keys against the README for v4.0.1; package naming alone is not enough to assume the public API.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource