Select All Items in a Dropdown Select
- Published: 15 Apr 2024 Updated: 08 Aug 2026
Let Users to Select All Options with a Simple Hint Action
When you have a dropdown select with multi select options, you can add a hint action to easily select all options at once.
and this is how you can do it:
1->hintAction(fn (Select $component) => Action::make('select all')
2 ->action(fn () => $component->state(ServiceCenter::pluck('id')->toArray()))
3)
Related Tricks:
make all Field or any components translatable
Unrequire fields recursively when saving as draft
Sometimes, when we need to test our application locally, we always have to fill forms manually. Let's take the Filament approach and achieve this with more accurate data.
Usability: Knowing whether or not the record was saved.
Let Users to Select All Options with a Simple Hint Action