Problem/Motivation

When click-sortable fields are put in the same table column for display purposes (e.g. using Format: Table > Settings, then changing the column of multiple fields to be the same), I would expect that the resulting column could still be made click-sortable, and that it would take all the fields into account.

Steps to reproduce

  1. Go to /admin/structure/views/view/content
  2. Click Table > Settings and change a few click-sortable fields to have the same column
  3. It removes the click-sortable checkbox for the fields that weren't originally in that column
  4. View the results
  5. Upon clicking to sort on that column with multiple fields, only the field originally in that column is sorted by

Proposed resolution

Upon click-sort, it should sort by the first field, then by the second field, and so on, for each field in the click-sorted column.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

solideogloria created an issue. See original summary.

lendude’s picture

Title: Make fields in the same column click-sortable together » Make fields in the same column click-sortable together by adding sorts for each field

Hmm multiple field in a column is not something I see a lot of, but also not something that can easily be done in contrib I think. So fair to request this as a core feature I feel.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.