Download the PHP package glebred/search-multiselect-input without Composer
On this page you can find all versions of the php package glebred/search-multiselect-input. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download glebred/search-multiselect-input
More information about glebred/search-multiselect-input
Files in glebred/search-multiselect-input
Package search-multiselect-input
Short Description Searchable multiple select input for Livewire Laravel 8
License MIT
Informations about the package search-multiselect-input
Livewire Searchable Multiselect Input
Livewire component for searchable multiselect input with dynamic data source
Preview
Installation
Install the package via composer:
Publish the view
You will find that new view in views/vendor/search_multiselect_input/components
Requirements
This package uses livewire/livewire
(https://laravel-livewire.com/) under the hood.
It also uses TailwindCSS (https://tailwindcss.com/) for base styling.
Please make sure you include both of these dependencies before using this component.
Usage
In order to use this component, you must create a new Livewire component that extends from
SearchMultiselectInput
You can use make:livewire
to create a new component. For example.
In the MyMultiInput
class, instead of extending from the base Livewire Component
class,
extend from SearchMultiselectInput
class. Also, remove the render
method.
In this class, you must implement the following methods to configure data sources. For instance, here I'm getting data from my User model
To render the component in a view, just use the Livewire tag or include syntax
Or if you want to pass parameters for an edit form then
And then in your MyMultiInput.php
Advanced behavior
// TODO 😬
AlpineJs support
Add AlpineJs for arrow-keys navigation, enter key for selection, enter/space keys for reset. 😎
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.