Skip to content

"Allow to define a default action when clicking a grid row" breaks "Allow customize entity row attributes on index page" #7562

@bt-nn

Description

@bt-nn

Describe the bug
Commit Allow customize entity row attributes on index page allwoed

{% block entity_row_attributes %}
    class="status-row status-row-{{ entity.instance.status.name|lower }}"
{% endblock %}

by adding the block in the <tr> tag
templates/crud/index.html.twig
the <tr> only had a data-id, so adding a class worked like expected.

Commit Allow to define a default action when clicking a grid row
added a class tag templates/crud/index.html.twig so adding a class like above dont work anymore, as it will generate two class tags

To Reproduce
Extend the index temlate and add

{% block entity_row_attributes %}
    class="status-row status-row-{{ entity.instance.status.name|lower }}"
{% endblock %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions