humunuk
humunuk
FFilament
Created by humunuk on 11/12/2024 in #❓┊help
Using multi-select does not working when using it inside an Action
Adding ->dehydrated() makes it work, I am not sure it works as expected though
8 replies
FFilament
Created by humunuk on 11/12/2024 in #❓┊help
Using multi-select does not working when using it inside an Action
awesome thank you 🙂
8 replies
FFilament
Created by humunuk on 11/12/2024 in #❓┊help
Using multi-select does not working when using it inside an Action
in dd(request()->all()) the data is present
array:2 [▼ // app/Filament/Resources/AccessGroupResource/RelationManagers/DoorsRelationManager.php:46
"_token" => "Tkf6ge5fVrBJapiLJE9IDc7A1GfLKY9rm0goNpoq"
"components" => array:1 [▼
0 => array:3 [▼
"snapshot" => "{"data":{"ownerRecord":[null,{"class":"App\\Models\\AccessGroup","key":1,"s":"mdl"}],"pageClass":"App\\Filament\\Resources\\AccessGroupResource\\Pages\\EditAcce

"
"updates" => array:2 [▼
"mountedTableActionsData.0.selected_doors.0" => "1"
"mountedTableActionsData.0.selected_doors.1" => "3"
]
"calls" => array:1 [▼
0 => array:3 [▶]
]
]
]
]
array:2 [▼ // app/Filament/Resources/AccessGroupResource/RelationManagers/DoorsRelationManager.php:46
"_token" => "Tkf6ge5fVrBJapiLJE9IDc7A1GfLKY9rm0goNpoq"
"components" => array:1 [▼
0 => array:3 [▼
"snapshot" => "{"data":{"ownerRecord":[null,{"class":"App\\Models\\AccessGroup","key":1,"s":"mdl"}],"pageClass":"App\\Filament\\Resources\\AccessGroupResource\\Pages\\EditAcce

"
"updates" => array:2 [▼
"mountedTableActionsData.0.selected_doors.0" => "1"
"mountedTableActionsData.0.selected_doors.1" => "3"
]
"calls" => array:1 [▼
0 => array:3 [▶]
]
]
]
]
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
Answering myself, turns out you can, there is HasUnsavedDataChangesAlert trait that you can use and component: <x-filament-panels::page.unsaved-data-changes-alert />
// in your custom page

class ViewWorkRequest extends ViewRecord
{
use HasUnsavedDataChangesAlert;


public function mount(int|string $record): void
{
parent::mount($record);
$this->hasUnsavedDataChangesAlert();
$this->form->fill();
}
}

// in blade file
<div>
{{ $this->form }}

<div class="mt-6 text-end">
<x-filament::button wire:click="save">
Save
</x-filament::button>
</div>

<x-filament-panels::page.unsaved-data-changes-alert />
</div>
// in your custom page

class ViewWorkRequest extends ViewRecord
{
use HasUnsavedDataChangesAlert;


public function mount(int|string $record): void
{
parent::mount($record);
$this->hasUnsavedDataChangesAlert();
$this->form->fill();
}
}

// in blade file
<div>
{{ $this->form }}

<div class="mt-6 text-end">
<x-filament::button wire:click="save">
Save
</x-filament::button>
</div>

<x-filament-panels::page.unsaved-data-changes-alert />
</div>
4 replies