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

No description
3 Replies
justlasse
justlasse11mo ago
Make a grid, and add an actions group to each. Add the actions inside this group and alignLeft and alignRight()
Proculair B.V.
Proculair B.V.OP11mo 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
Sylfel9mo 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
Want results from more Discord servers?
Add your server