CpSortableCustomColumns-Craft icon indicating copy to clipboard operation
CpSortableCustomColumns-Craft copied to clipboard

Retain default sorting option regardless of selection (as Craft natively does)

Open timkelty opened this issue 9 years ago • 3 comments

Craft natively always lets you sort by a handful of criteria:

screen shot 2016-06-15 at 12 09 41 am

Once you enable this plugin, these go away. So if you want to sort by "date updated", you have to add a column for it.

timkelty avatar Jun 15 '16 04:06 timkelty

Hi @timkelty – thanks for contributing!

I can see the use case for wanting to have a certain attribute (e.g. "Date Updated") in the dropdown without having to display it in the table, although the current behaviour is actually by design.

Personally, I find sorting on attributes that isn't displayed in the actual element index a bit confusing; IMO its much clearer when the dropdown and table mirror each other. Also, it isn't uncommon that a few of those "default attributes" is either not useful or even totally irrelevant to the current index (I'm looking at you, "Expiry Date"), so being able to strip out those attributes where you don't need them is a plus, in my book.

I think this is mostly a personal preference thing, though. I'm totally open to having my mind changed on the matter and I'd love to hear arguments in favor of retaining the default attributes for all indexes (it has to be an either/or thing, as I'm definitely not going to add some sort of UI on top of the CEI).

mmikkel avatar Jun 17 '16 09:06 mmikkel

No, I think you're right on all accounts. After I made the issue I realized it was probably by design :)

Go ahead and close if you like!

timkelty avatar Jun 17 '16 11:06 timkelty

Awesome – thanks for getting back to me, @timkelty. I'll leave the issue open for a little while, maybe someone has opinions :)

mmikkel avatar Jun 17 '16 11:06 mmikkel