humunuk
humunuk
FFilament
Created by humunuk on 11/12/2024 in #❓┊help
Using multi-select does not working when using it inside an Action
Hello, I have a table header action with multi-select, when I choose multiple options and press submit, then after submit $data array is empty Any ideas how to debug this or what I am doing wrong?
->headerActions([
Tables\Actions\Action::make('doors_to_add')
->label('Search and add')
->form([
Select::make('selected_doors')
->relationship('door', 'name', function ($query) {
$query->where('company_id', Filament::getTenant()->id)
->where('facility_id', $this->getOwnerRecord()->facility_id)
->whereNotIn('doors.id', $this->getOwnerRecord()->doors->pluck('door_id')->toArray());
})
->searchable(['name'])
->preload()
->multiple()
->required(),
])
->mutateFormDataUsing(function (array $data) {
\Log::info('Form data before action: '.print_r($data, true));

return $data;
})
->action(function (array $data) {
dd($data, request()->all());
}),
])
->headerActions([
Tables\Actions\Action::make('doors_to_add')
->label('Search and add')
->form([
Select::make('selected_doors')
->relationship('door', 'name', function ($query) {
$query->where('company_id', Filament::getTenant()->id)
->where('facility_id', $this->getOwnerRecord()->facility_id)
->whereNotIn('doors.id', $this->getOwnerRecord()->doors->pluck('door_id')->toArray());
})
->searchable(['name'])
->preload()
->multiple()
->required(),
])
->mutateFormDataUsing(function (array $data) {
\Log::info('Form data before action: '.print_r($data, true));

return $data;
})
->action(function (array $data) {
dd($data, request()->all());
}),
])
8 replies
FFilament
Created by humunuk on 2/24/2024 in #❓┊help
InfoList TextEntry alignEnd() only applies to text but not Label
No description
4 replies
FFilament
Created by humunuk on 1/30/2024 in #❓┊help
Unsavedchanges feature outside of panels
Can you enable "unsaved changes" feature per form? F.e - when using form on a custom page, outside of panel
4 replies