Is there a way of displaying a "sorted by" summary in the "info" feature?
Is there a way of displaying a "sorted by" summary in the "info" feature?

Currently, this is on an intranet site so I cannot show an example.
When I click on the columns to sort, the arrows highlighted as expected, but if I shift-click and add a secondary sort, it's not apparent how the table is being sorted since it's sorted by one column and then a secondary column.
So, I'm wondering if there is a plugin or other option which would show more verbose details about the sorting.
Thank you
Answers
I would look at using
infoCallback
for this. In the callback useorder()
to get the current ordering.Kevin
It's a cool idea for a plugin that. You could listen for the
info
event and modify the info there.Another option, if you want a more visual representation of the applied sort is to use the plugin presented here.
Allan
Its good practice for me to try little plugins now and then, so here is one which adds the column name to the info element: https://live.datatables.net/xatimufo/1/edit .
You just need to add
infoOrder
to the initialisation options.Things to add: details about ordering direction, and support for multiple column ordering.
Allan