Reuse filament select multiple in custom component
I am trying to re-use some of Filaments components, and I am looking specifically to use the Select with multiple options. I saw the code below which seems to be working fine for simple selects, but I can't get it to work with multiple values. Can someone please help? I am not that good with Livewire and Laravel, still learning this through... Thanks!
<x-filament::input.wrapper>
<x-filament::input.select wire:model="records">
<option value="draft">Draft</option>
<option value="reviewing">Reviewing</option>
<option value="published">Published</option>
</x-filament::input.select>
</x-filament::input.wrapper>
4 Replies
the way i did it was making a trait.
then in your resource form:
Are you always using it in a Filament Form?
No, I am not using it inside a Filament Form, it's just in a custom Livewire component I am creating.
Any ideas?
Multiples probably requires some JS Assets. Check what happens when we include ->multiple() on the original field component