0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Allow setting a classname on the table header row

This commit is contained in:
Matt Westcott 2021-12-08 20:36:38 +00:00 committed by Matt Westcott
parent 77f8d160a7
commit 13aa7ec861
2 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,7 @@
{% endfor %}
{% endif %}
<thead>
<tr>
<tr {% if table.header_row_classname %}class="{{ table.header_row_classname }}"{% endif %}>
{% for column in table.columns.values %}
{% component column.header %}
{% endfor %}

View File

@ -179,6 +179,7 @@ class UserColumn(Column):
class Table(Component):
template_name = "wagtailadmin/tables/table.html"
classname = 'listing'
header_row_classname = ''
def __init__(self, columns, data, template_name=None, base_url=None, ordering=None):
self.columns = OrderedDict([