-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
In the following example:
http://www.datatables.net/extensions/rowreorder/examples/initialisation/simple.html
when a user sorts data on the table it does not alter the sequence numbers, so a user cannot use the sorts to reset the sequence numbers before customizing the sequence orders, so if a users has a particular sequence order right now they have to manually drag each item on the list into the right sequence.
Instead I think that when a user sorts the data by any of the columns other than the first column, there should be a setting to update the Seq. numbers with the newly sorted order. 'reorderOnSort: true or false' so that if i sort by names, then the first number in the sequence would be 'Airi Satou', and the sort numbers would proceed in alphabetical order.
If the new option is 'true', the table will create a event listener on sorting, or perhaps the fnDrawCallback, and then after a table has changed, it updates the sequence numbers to whatever new position they are in the table.
Secondly, when a row is manually reordered by a users, the sort should automatically be removed from whichever column has it, and if the Seq. column is visible, it will indicate that the rows are now sorted by the Seq. column. Thus if the table is sorted by names, and then I drag a name to a different spot on the list, with the 'reorderOnSort' as true, the sort indicator would switch to the seq. list when it updates the positions since the list is no longer sorted by names.