Split action footer alignment, delete btn start & submit btn end

No description
3 Replies
justlasse
justlasse5mo ago
Make a grid, and add an actions group to each. Add the actions inside this group and alignLeft and alignRight()
Proculair
Proculair5mo ago
Okay Cool! Didn't quite manage to work it out. Here is my setup:
ViewAction::make()
->slideOver()
->extraModalFooterActions([
EditAction::make()
->button()
->slideOver()
->extraModalFooterActions([
DeleteAction::make()->button(),
]),
]),
ViewAction::make()
->slideOver()
->extraModalFooterActions([
EditAction::make()
->button()
->slideOver()
->extraModalFooterActions([
DeleteAction::make()->button(),
]),
]),
Preferably The DeleAction or all the actions in extraModelFooters should be alignt left and the submit/cancel actions to the right
Sylfel
Sylfel3mo ago
Hi, You can solve this by customize footer action :
ViewAction::make()
->slideOver()
->extraModalFooterActions([
EditAction::make()
->button()
->slideOver()
->modalFooterActions(fn (Record $record, Action $action) => [
DeleteAction::make()
->requiresConfirmation()
->record($record)
->cancelParentActions()
->extraAttributes([
'class' => 'me-auto',
]),
$action->getModalCancelAction(),
$action->getModalSubmitAction(),
])
]);
ViewAction::make()
->slideOver()
->extraModalFooterActions([
EditAction::make()
->button()
->slideOver()
->modalFooterActions(fn (Record $record, Action $action) => [
DeleteAction::make()
->requiresConfirmation()
->record($record)
->cancelParentActions()
->extraAttributes([
'class' => 'me-auto',
]),
$action->getModalCancelAction(),
$action->getModalSubmitAction(),
])
]);
Where 'me-auto' class is a margin-auto to push items