Skip to content

Conversation

@bt-nn
Copy link
Contributor

@bt-nn bt-nn commented Dec 16, 2025

Previously, Action::asTextLink() only applied when the parameter was true. Passing false had no effect, leaving the Delete action always rendered as a text link. With this change, false is now explicitly supported. This allows developers to disable text links for actions such as DELETE on the index page.

This provides a workaround for issue #7120. Example usage:

public function configureActions(Actions $actions): Actions
{
    return $actions->update(CRUD::PAGE_INDEX, Action::DELETE, function (Action $action) {
        return $action->asTextLink(false);
    });
}

Previously, Action::asTextLink() only applied when the parameter was true.
Passing false had no effect, leaving the Delete action always rendered as a text link.
With this change, false is now explicitly supported. This allows developers to disable text links for actions such as DELETE on the index page.

This provides a workaround for issue EasyCorp#7120. Example usage:

    public function configureActions(Actions $actions): Actions
    {
        return $actions->update(CRUD::PAGE_INDEX, Action::DELETE, function (Action $action) {
            return $action->asTextLink(false);
        });
    }
@sukhoy94
Copy link

I like it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants