[5.x]: Sort icon is missing for ordering
What happened?
Description
For any overview that can be ordered, the icons that should indicate selected ordering isn't showing.
Also, it would be very usefull if a page load would not reset the selected ordering.
Steps to reproduce
- Go to the CP > settings > entry types
- Do not notice the entry types can be ordered because of the missing icon
- Order the entry types by clicking on the "handle" table heading
- refresh the page
Expected behavior
Actual behavior
Craft CMS version
5
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
screenshot of the missing icon:
Hi, thanks for reporting. I raised a PR to align the styles of those headers with the element index tables and to show the relevant arrow icon when the column is sorted.
A couple of things to note:
- The tables, like the Entry Types table, don’t store the selected sort options, so when you reload, the order goes back to the defaults
- The screenshot you shared looks to be from an Entries index page for a structure? Structures are ordered by the custom order of the entries in it, and they support drag and drop to reorder (that’s why you can see the diamond icon to the left of the “Homepage”). You can switch to the regular table view, and then you’ll be able to sort by various headings (icons above the table, to the right of the search input).
Thank you foryour reply.
The screenshot was indeed of an Entries index page, but the same issue applies to (for example) cp/settings/entry-types and cp/settings/fields. Both tables can be ordered by clicking the table heading but do not show the corresponding sort-icon.
One last note, is there a reason the table in cp/settings/sections can't be sorted (we don't use "general", "categories" or "tags" so I don't know about those)?
One last note, is there a reason the table in cp/settings/sections can't be sorted
Thanks for the suggestion! We’re making the table on the sections index page sortable in 5.5.
Craft 4.12.8 and 5.4.9 are out with the updated table header styling to reveal when an admin table column is being sorted on.
Craft 5.5.0 is out with the ability to sort sections in the Sections index page :tada: (#15936)