By tanuj. on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
10.2.x
Introduced in version:
10.2.4
Issue links:
Description:
Currently in Drupal if a column in a view has the option "Add default classes" turned off, then its header and data cells get the same classes as the prior column. This leads to more than one column seeming to be "active" for sorting, and other possible problems with incorrect classes being applied.
After this change view's column_classes will get reset if "Add default classes" option is turned off. This change occurs in default view template views-view-table.html.twig and for all of the themes in core.
Any custom themes that include a version of this template, such as the contrib version of Classy, also need this fix.
Before
{% for key, column in header %}
{% if column.default_classes %}
{%
set column_classes = [
'views-field',
'views-field-' ~ fields[key],
]
%}
{% endif %}After
{% for key, column in header %}
+ {% set column_classes = [] %}
{% if column.default_classes %}
{%
set column_classes = [
'views-field',
'views-field-' ~ fields[key],
]
%}
{% endif %}Impacts:
Themers
Comments
Too soon?
This change has not yet been committed and the associated issue is only under review. Should this record be unpublished as a draft for now?
ComputerMinds