Skip to content

Can't render Delete button as button #7120

@mhbailly

Description

@mhbailly

Describe the bug

  • On the Detail page, I want all the actions to look like buttons
  • By default, the Delete action is now a link (corresponding change )
  • In the controllers, the Action cannot be configured to be displayed as a button

To Reproduce
In a Controller try the following

public function configureActions(Actions $actions): Actions
{
  $actions = parent::configureActions($actions);
  $actions->update(Crud::PAGE_DETAIL, Action::DELETE, static function(Action $action) {
                return $action
                    ->renderAsButton()
                    ->asTextLink(false);
  });
  return $actions;
}

Additional context

  • asTextLink(false) does nothing
  • renderAsButton() does not change the style

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions