Implement sticky header actions in edit pages: Added save and cancel actions with localization support to the header of EditBlog, EditCustomer, EditLanguage, EditPage, EditSetting pages. Introduced a new Blade view for sticky actions, enhancing user experience by keeping action buttons accessible during form editing.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Admin\Resources\Customers\Pages;
|
||||
|
||||
use App\Filament\Admin\Resources\Customers\CustomerResource;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
@@ -13,7 +14,24 @@ class EditCustomer extends EditRecord
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
Action::make('save')
|
||||
->label('Save')
|
||||
->action('save')
|
||||
->keyBindings(['mod+s'])
|
||||
->color('primary')
|
||||
->size('sm'),
|
||||
Action::make('cancel')
|
||||
->label('Cancel')
|
||||
->url($this->getResource()::getUrl('index'))
|
||||
->color('gray')
|
||||
->size('sm'),
|
||||
DeleteAction::make()
|
||||
->size('sm'),
|
||||
];
|
||||
}
|
||||
|
||||
protected function getFormActions(): array
|
||||
{
|
||||
return []; // Boş array döndürerek alt taraftaki form action'larını gizliyoruz
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user