humunuk
humunuk
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